On 23 Aug 01, at 14:30, John Bass wrote:
> <TABLE>
> <?php
> $query = "SELECT image_link, web_url FROM testdata";
> $result = mysql_query ($query) or die ("Query Failed");
> while ($row = mysql_fetch_object ($result))
> {
> printf ("<tr><TD>%s<br>%s</TD> <TD>%s<br>%s</tr>\n", $row->image_link,
> $row->web_url,$row->image_link, $row->web_url);
> }
> ?>
> </TABLE>
Your 'while ($row...) is reading in one row of data. You're then outputing
that one row of data twice. Is that what you wanted?
You don't specifically say what it is that isn't working in this code so I'm
really just guessing. If you're actually after a different set of data in each
row then you're going to need to approach it differently.
To have new data in the second column you'll basically have to add a flag
to track if you've already put data on that row and then change the tags
accordingly (if you've already got the start of the row, add the new column
and end the row, otherwise start a row and add your data).
CYA, Dave
-----------------------------------------------------------------------
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au mailto:[EMAIL PROTECTED]
-----------------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]