Basic output from MySQL table to a Web Page, How to print multi? line output |
![]() ![]() |
Basic output from MySQL table to a Web Page, How to print multi? line output |
Jun 18 2007, 08:21 AM
Post
#1
|
|
|
Member ![]() ![]() Posts: 53 OS: XP |
This is a bit of a follow up from an earlier question. I have managed to writePHP code to draw my info line by line from the MySql database. My test script output the print in one long stream of info - but at least I know its doing what its supposed to as far as the retrieval is concerned. What I want to do now is print this info neatly. There are about 15 columns and up to 25 rows. Some of the columns MAY have info or may be blank. There may be one row or up to 25 rows, with a total row below that. Should I be creating a table (inside a layer) for the out put or printing one long line and then the next line...... I cant work out how to print a line at a time to fill a table that will vary in row size. Any pointers or sample code I can scrutinise? ? ? ? Cheers, Sandy |
|
|
Jun 19 2007, 08:36 AM
Post
#2
|
|
|
Member ![]() ![]() Posts: 33 From: UK OS: XP/Linux |
Vary in row size?
If you dont want a row or something, you could 'theoritically' just do something like.. CODE <?
if($row[field] != "") { echo "<td>$row[field]</td"; } |
|
|
Jun 19 2007, 08:37 AM
Post
#3
|
|
|
Member ![]() ![]() Posts: 33 From: UK OS: XP/Linux |
Sorry.
This post has been edited by BirdieUK: Jun 19 2007, 08:39 AM |
|
|
Jun 20 2007, 06:01 AM
Post
#4
|
|
|
Retired Staff Posts: 1,856 From: Australia OS: Linux |
Showing us what code you have so far might help us show you how to change it.
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
2 / 164 | 7th February 2006 - 12:58 PM emblazon12000 started - last by dsenette |
|||||
![]() |
2 / 346 | 4th April 2006 - 12:18 PM JoelA started - last by Thef0rce |
|||||
![]() |
0 / 150 | 27th January 2007 - 07:44 AM Scemino started - last by Scemino |
|||||
![]() |
14 / 214 | 24th December 2008 - 10:29 AM malkauori started - last by Rorschach112 |
|||||
|
Time is now: 8th January 2009 - 02:08 AM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |