PHP Splitting data from Database

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
kierongi
Posts: 30
Joined: Mon Aug 12, 2013 9:57 pm

PHP Splitting data from Database

Post by kierongi »

just wanted to know if there was a way of splitting data from your MYSQL tables for example i have a table with cities names e.g:

ID City Name Attraction Population(in mill) Landmarks Economy
1 London 20 8.2 Trafalgar Square £30,000+
2 Cardiff 15 0.3 Millennium Stadium £30.000-
3 Liverpool 14 0.4 Royal Liver Building £15.000+

and i retrieve the info with simple:

Code: Select all

$invinfo="SELECT * from Cities where attraction <= '$playerinfo3[Overall]'";
$invinfo2=mysql_query($invinfo) or die("could not get opponent stats!");
$invinfo3=mysql_fetch_array($invinfo2
now what i also have individual data for each city such as attraction and i want to put these in a table with there own individual data not by using the ID of the City as this table and city names will be assigned randomly based on the players overall data:

City Name Attraction Population(in mill) Landmarks Economy
London 20 8.2 Trafalgar Square £30,000+
Cardiff 15 0.3 Millennium Stadium £30.000-
Liverpool 14 0.4 Royal Liver Building £15.000+

sorry if i have not described this well and i hope that this is possible
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: PHP Splitting data from Database

Post by Jackolantern »

I am not quite sure what you are wanting to do. You are wanting to fill this data into a table?
The indelible lord of tl;dr
Post Reply

Return to “Advanced Help and Support”