RE: [PHP-DB] Table display Driving me Crazy!
| From: | Rick Emery | Date: | Thu, 13 Sep 2001 17:28:53 +0000 |
| Subject: | RE: [PHP-DB] Table display Driving me Crazy! | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12413@lists.php.net to get a copy of this message | ||
What does you mysql table look like?
What does your SELECT statements look like?
What does function p() do?
What does function f() do?
Need more info....
-----Original Message-----
From: Adv. Systems Design [mailto:asd_2000@yahoo.com]
Sent: Thursday, September 13, 2001 11:09 AM
To: PHP List
Subject: [PHP-DB] Table display Driving me Crazy!
Hello *
trying to output mysql content into a table, but the
table is designed to use 3 Trows to display info for
ONE product (table also has to have 5 columns):
row1 sku1|sku2|sku3|sku4|sku5
row2 img1|img2|img3|img4|img5
row3 nam1|nam2|nam3|nam4|nam5
---------------------------------
row4 sku6|sku7|sku8|sku9|sku10
row5 img6|img7|img8|img9|img10
row6 nam6|nam7|nam8|nam9|nam10
---------------------------------
etc...
I have code that is displaying the right #of columns
but it is simply repeating the product across the
table...
<table width="100%" border="1" cellspacing="0"
cellpadding="0" bgcolor="#000000">
<?php
$db->query($list);
while ($db->next_record()) { ?>
<tr bgcolor="#666666">
<?php $numcols = 5;
for ($l = 1; $l <= $numcols; ++$l) {?>
<td width="139" class="ModNo"
bordercolor="#000000"><?php echo
$db->f("product_sku"); ?></td>
<?php } ?>
</tr>
<tr bgcolor="#ECEF7A">
<?php for ($l = 1; $l <= $numcols; ++$l) { ?>
<td height="80" bordercolor="#000000">
<div align="center"><A HREF="<?php
$sess->purl(URL . "?page=$flypage&product_id=" .
$db->f("product_id") . "&category_id=" .
$db->f("category_id")); ?>">
<?php
$ps_product->show_image($db->f("product_thumb_image"),"");
?></A>
</div>
</td>
<?php } ?>
</tr>
<tr bgcolor="#C9C62D" bordercolor="#C9C62D">
<?php for ($l = 1; $l <= $numcols; ++$l) { ?>
<td class="prodName"><?php
$db->p("product_name"); ?></td>
<?php } ?>
</tr>
<?php } ?>
</table>
Anybody have any ideas how I can get this thing to
work?!
Thanks
Luis
__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net