Re: Printing MySQL into HTML Tables
| From: | darion mapp | Date: | Thu, 22 Mar 2001 22:40:22 +0000 |
| Subject: | Re: Printing MySQL into HTML Tables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45199@lists.php.net to get a copy of this message | ||
now it seems like you know what is to be done and you are not willing to do the work. Now i have not
tested this and you may have to do some work with it but you get the picture. if you lookup the
syntax and ensure how to use the command then you will be ok.
of course if you still have problems then let em know
FOR($i = 0;$i < $numrows; ++$i)
{
echo"<tr><td>$mysql_result($resultidentiferfromquery, $i,
fieldwithproduct)</td><td>$mysql_result($resultidentiferfromquery, ++$i,
fieldwithproduct)</td></tr>";
echo"<tr><td>$mysql_result($resultidentiferfromquery, ++$i,
fieldwithproduct)</td><td> </td></tr>";
if($i/2 > 0) //not even
{
echo"<tr><td> </td>><td> </td></tr>";
}
}
--
On Thu, 22 Mar 2001 15:19:09
Jeff Oien wrote:
>I would like to do this with a MySQL database containing
>product information:
>
><tr><td>Product 1 Info</td><td>Product 2 Info</td></tr>
><tr><td>Product 3 Info</td><td> </td></tr>
>
>And if there are an odd number of products I want it to
>complete the table row with nothing in the cell. I want
>it to be able to automatically do this no matter how many
>products there are. I'm not sure how to set it up to
>print every other like that.
>Jeff Oien
>
>--
>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 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html