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.
I've had a quick look on the net and I can't find anything, I'm gonna look a bit more. I'll post back if I find anything that works.
$user = "";
$pass = "";
$host = "";
$dbase = "";
$tablename = "";
mysql_connect($host, $user, $pass);
mysql_select_db($dbase);
?>
// you fear my code.
?>
Now I've gotta work out how to combine that with what I've got!
$db = mysql_connect("localhost", "o", "o");
mysql_select_db("o",$db);
$result = mysql_query( "SELECT * FROM news ORDER BY id DESC LIMIT 7;" )
or die("SELECT Error: ".mysql_error());
# Loop through each row of data.
while ($a_row = mysql_fetch_array($result)){
print "
Subject: $a_row[subject] | \n";Post ID: $a_row[id] | |
Date: $a_row[date] | ||
|
print "
\n";
}
mysql_close($db);
?>
I've got this at the moment.
I can't see how it would combine as yours is different.
Hmmmmmmmmmmmmmmmmmmmmmmmmmmmm.
I think I found something earlier on, just gotta test it out now.