Forum Moderators: coopster

Message Too Old, No Replies

Putting query output into specific table cells

Repost / edit of prior post

         

Nevgar

10:41 pm on Jun 3, 2007 (gmt 0)

10+ Year Member



I am trying to put results from a query into specific cells in a table.
Right now, the output comes out as:
result key1 ... result value1
result key2 ... result value2
result key3 ... result value3
etc.

For all the fields in the db
I would like to pick and choose where in an html the result value goes, based on what the key is.
for example:
(This is a table, 3 cols wide, 2 rows deep, results formatted differently than the labels)

Result key 1 Made up label Result key 3
result value1 result value2 result value3

As I am a real newbie at php and mysql, any help (worded for a complete idiot, please) would be appreciated.

Thanks
Nevgar - Inuvik, NT, Canada

eelixduppy

1:09 pm on Jun 4, 2007 (gmt 0)



We have a great library thread, [webmasterworld.com...] , that show the basics of extracting data from mysql. Within the while loop, you must print the information into the cols/rows however you want it to look. As it loops through, it will add an extra row each time.

Try it out first and get back to us on your progess.

oh, and welcome to webmasterworld :)