The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Just as you asked!
Anyway.
Does anyone know about MySQL and displaying the data in a table?
I've got a basic script to display it like this (http://www.phi11ip.com/mysql/display.php) but I want to be able to display it out of the rows and something like it shows at the bottom of the page...
Does anybody know how to do anything like this? If you can give me the general idea of what to do with a small example or a link to one I should be able to modify it and get it working...
Thanks.
Just as you asked!
Anyway.
Does anyone know about MySQL and displaying the data in a table?
I've got a basic script to display it like this (http://www.phi11ip.com/mysql/display.php) but I want to be able to display it out of the rows and something like it shows at the bottom of the page...
Does anybody know how to do anything like this? If you can give me the general idea of what to do with a small example or a link to one I should be able to modify it and get it working...
Thanks.
I just don't know how to tell certain fields where to be put...
I've only got a script that prints the whole line...
Example:
# DATABASE CONNECTION CODE HERE, which you should already have.
$results = mysql_query(SELECT * FROM TableName);
# Loop through each row of data.
while ($a_row = mysql_fetch_array($results)) {
}
?>
You can use the mysql_fetch_array to get the results in an array with the field names attached.
Example:
# DATABASE CONNECTION CODE HERE, which you should already have.
$results = mysql_query(SELECT * FROM TableName);
# Loop through each row of data.
while ($a_row = mysql_fetch_array($results)) {
print "$a_row[One_Field_name]\n";
print "$a_row[Another_Field_name]\n";
print "$a_row[One_More_Field_name]\n";
}
?>
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print "There are $num_rows records.
";
print "
$field | \n";
mysql_close($db);
?>
At the moment it's this. (minus the top)
I want to change the way it displays the data, change the layout of the table...
I'll have a go and see...
I might be able to get somewhere now!
Good luck.