Re: Need help to create HTML table with 2 columns.

From: Date: Thu, 23 Aug 2001 15:29:50 +0000
Subject: Re: Need help to create HTML table with 2 columns.
Groups: php.general 
Request: Send a blank email to php-general+get-64110@lists.php.net to get a copy of this message
second column should print next record that was returned from the query. Thanks. John
From: "Jeff Lewis" <jeff@hyrum.net> Reply-To: "Jeff Lewis" <jeff@hyrum.net> To: "John Bass" <php_mysql21@hotmail.com>, <php-general@lists.php.net> Subject: Re: [PHP] Need help to create HTML table with 2 columns. Date: Thu, 23 Aug 2001 11:29:36 -0400 What did you want in the second column? I was just going by what you had listed below: $row->image_link,
$row->web_url,$row->image_link, $row->web_url);
Jeff ----- Original Message ----- From: "John Bass" <php_mysql21@hotmail.com> To: <php-general@lists.php.net> Sent: Thursday, August 23, 2001 11:16 AM Subject: Re: [PHP] Need help to create HTML table with 2 columns. Hi, Thank you for the email. I tried your code, but first column is printing image_link & web_url fields correctly and second column is repeating values of the first column. Other records or rows are printing same way. Regards, John Bass
From: "Jeff Lewis" <jeff@hyrum.net> Reply-To: "Jeff Lewis" <jeff@hyrum.net> To: "John Bass" <php_mysql21@hotmail.com>, <php-general@lists.php.net> Subject: Re: [PHP] Need help to create HTML table with 2 columns. Date: Thu, 23 Aug 2001 10:41:08 -0400 John, Try this: <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>".$row->image_links."<br>".$row->web_url."</TD> <TD>".$row->image_link."<br>".$row->web_url."</tr>\n"); } ?> </TABLE> ----- Original Message ----- From: "John Bass" <php_mysql21@hotmail.com> To: <php-general@lists.php.net> Sent: Thursday, August 23, 2001 10:30 AM Subject: [PHP] Need help to create HTML table with 2 columns.
Hi All, I am trying to generate a table with two columns. Each column
should
print
2 fields named image_link and web_url. Have spent over week looking documentations and trying different coding but nothing is working.
Any
help
will be greatly appreciated. <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> Regards, John Bass _________________________________________________________________ Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail:
php-list-admin@lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail:
php-list-admin@lists.php.net
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

« previous php.general (#64110) next »