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.
Fri 22/08/03 at 17:33
Regular
"It goes so quickly"
Posts: 4,083
Sorry.

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";
}
?>
Fri 22/08/03 at 17:31
Regular
"It goes so quickly"
Posts: 4,083
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)) {

}
?>
Fri 22/08/03 at 17:29
Regular
"It goes so quickly"
Posts: 4,083
Can you put that code here, as I know what you want, but it isn't as fresh in my head as I'd like it to be.
Fri 22/08/03 at 17:27
Regular
"Chavez, just hush.."
Posts: 11,080
I can change the database order no problem.

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...
Fri 22/08/03 at 17:18
Regular
"It goes so quickly"
Posts: 4,083
So, you mean in a different order than it is in the Database?
Fri 22/08/03 at 16:57
Regular
"Chavez, just hush.."
Posts: 11,080
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.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Easy and free service!
I think it's fab that you provide an easy-to-follow service, and even better that it's free...!
Cerrie
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

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

Go to Support Centre

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.