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 think I found something earlier on, just gotta test it out now.
$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.
Now I've gotta work out how to combine that with what I've got!
$user = "";
$pass = "";
$host = "";
$dbase = "";
$tablename = "";
mysql_connect($host, $user, $pass);
mysql_select_db($dbase);
?>
// you fear my code.
?>
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.
I've managed to do the edit script now!
So I think I've managed to master the basics of MySQL now. My next task is to make that football site run off of MySQL so that matches can be searched etc etc.
Lots to do but it shouldn't be too bad, it's just basically a lot of entering, viewing and editing of data...
Must change that!
> So thanks for helping with that. My next task is to work out how to
> call records from the database and edit them, although that shouldn't
> be too hard.
Just a little pointer ... look into replacing SELECT with UPDATE when you make the MySQL Query.
"Site designed by me, if you want stuff, ask me. If you want something like a video, take it. Just host it elsewhere!"
The link for the 'ask me' text contains 'index.php' twice. Hense the 404 when you click it (nice 404 BTW).