echo "<div align='center'><table><tr><th colspan=5>Browsing shop items at <b>".$shopdata['shop']."...</b></tr>";
echo "<tr>";
$qtwo =
mysql_query(
"SELECT si.*,i.*,it.* FROM ".DB_SHOPITEMS." si LEFT JOIN ".DB_ITEMS." i ON si.sitemITEMID=i.itemid LEFT JOIN ".DB_ITEMTYPES." it ON i.itemtype=it.itemtypeid WHERE si.sitemSHOP=".$_GET['shop']." ORDER BY i.itemtype, i.itembuyprice, i.itemname") or die(mysql_error());
$st = "";
while ($data = mysql_fetch_array($qtwo))
{
if ($st != $data['itemtypename'])
{
$st = $data['itemtypename'];
echo"<tr><th colspan=5>".$st."</th></tr>";
}
echo "<td width='125'></br><div align='center' class='prod_box'>
<div class='center_prod_box'>
<div align='center' class='product_title'>".$data['itemname']."<a href='#'></a></div>
<div align='center' class='product_img'><a href='#'><img src='images/p1.jpg' alt='".$r['itmdesc']."' border='0' /></a></div>
<div align='center' class='prod_price'><span class='price'>".$buyprice."</span></div>
</div>
<div class='prod_details_tab'><form action='process_buy.php?ID=".$data['itemid']."' method='post'>Qty: <input type='text' name='qty' value='1' style='width:20px;'>
<input type='submit' value='Buy'></form></br></div>
</div></td>";
}
echo "</tr>";
echo "</table></div>";
closetable();
<div style='width:100%; display:block;'>
$qtwo =
mysql_query(
"SELECT si.*,i.*,it.* FROM ".DB_SHOPITEMS." si LEFT JOIN ".DB_ITEMS." i ON si.sitemITEMID=i.itemid LEFT JOIN ".DB_ITEMTYPES." it ON i.itemtype=it.itemtypeid WHERE si.sitemSHOP=".$_GET['shop']." ORDER BY i.itemtype, i.itembuyprice, i.itemname") or die(mysql_error());
$st = "";
while ($data = mysql_fetch_array($qtwo))
{
if ($st != $data['itemtypename'])
{
$st = $data['itemtypename'];
echo "<div style='width: 25%; float:left; padding:15px;'>\n"; // You said 4 right? 100/4 = 25
echo "Hammer for sale";
echo "</div>\n";
}
</div>
echo "<div align='center'><table><tr><th colspan=5>Browsing shop items at <b>".$shopdata['shop']."...</b></tr>";
echo "<tr>";
echo "<div style='width:100%; display:block; align='center'><table width='100%'>";
$i = 0;
if ($i==0){
echo "<tr>";
}
if ($i==4){
echo "</tr><tr>";
}
</tr></table>
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions