GetDotted Domains

Viewing Thread:
"MySQL - Displaying data in a table..."

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.

Fri 22/08/03 at 16:57
Regular
Posts: 787
There you go Mod.

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.
Sun 07/09/03 at 19:44
Regular
"Chavez, just hush.."
Posts: 11,080
How would I disable HTML/PHP from being processed by the server when it calls the data up/submits it to/from the MySQL database?

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.
Sun 07/09/03 at 20:10
Regular
"Eff, you see, kay?"
Posts: 14,156

$user = "";
$pass = "";
$host = "";
$dbase = "";

$tablename = "";

mysql_connect($host, $user, $pass);
mysql_select_db($dbase);

?>

$query = mysql_query("select * from $tablename");
$info = mysql_fetch_object($query);
echo "";
foreach ($info as $key=>$value) {
?>

}
echo "";
foreach ($info as $key=>$value) {
?>

}
echo "";
while ($info = mysql_fetch_object($query)) {
echo "";
foreach ($info as $key=>$value) {
?>

}
echo "";
}
echo "
";
// you fear my code.
?>
Sun 07/09/03 at 20:26
Regular
"Chavez, just hush.."
Posts: 11,080
OK, thanks.

Now I've gotta work out how to combine that with what I've got!
Sun 07/09/03 at 20:31
Regular
"Chavez, just hush.."
Posts: 11,080

$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 "\n";

print "\n";

print "\n";

print "\n";

print "\n";

print "
Subject: $a_row[subject]

Post ID: $a_row[id]

Date: $a_row[date]


size=2>".nl2br($a_row

[text])."
\n";

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.
Sun 07/09/03 at 22:27
Regular
"Eff, you see, kay?"
Posts: 14,156
There are lots of ways to grab and format data from a database. You can't really ask someone to do it for you, just read examples of code, get some skills and figure it out yourself.
Sun 07/09/03 at 22:59
Regular
"Chavez, just hush.."
Posts: 11,080
Oh, I forgot about that.

I think I found something earlier on, just gotta test it out now.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Great services and friendly support
I have been a subscriber to your service for more than 9 yrs. I have got at least 12 other people to sign up to Freeola. This is due to the great services offered and the responsive friendly support.
Best Provider
The best provider I know of, never a problem, recommend highly
Paul

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.