Table display Driving me Crazy!

From: Date: Thu, 13 Sep 2001 16:09:10 +0000
Subject: Table display Driving me Crazy!
Groups: php.db 
Request: Send a blank email to php-db+get-12412@lists.php.net to get a copy of this message
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/

« previous php.db (#12412) next »