- 论坛徽章:
- 0
|
<code]>;
<?
$p=($Page) ? $Page : 1; //当前页号
$lim=5; //每页条数
$rn=@mysql_NumRows(mysql_query("select productid from products where category=".$category));
if($rn==0){echo"<center>;<br>;抱歉,暂时没有该类商品... ...<br>;<br>;</center>;";}
$pages=($rn%$lim)?(intval($rn/$lim)+1) rn/$lim;
$query="select * from products where category=".$category." order by productid desc,name desc,description desc,gongxiao desc,guige desc,yongfa desc,chengfen desc,zhuyi desc,yuanjia desc,xianjia desc,price desc,pic desc limit ".(($p-1)*$lim).",$lim";
$result=mysql_query($query);
while($row=mysql_fetch_array($result))
{echo"
<table cellspacing=0 cellpadding=2 width=95%
align=center border=0>;
<tbody>;
<tr>;
<td width=15%>;
<div align=center>;<a title=点击查看详情 target=\"_blank\"
href=\"view.php?category=".$category."&productid=".$row["productid"]."&customerid=".$customerid."\">;<img src=".$row["pic"]." width=78 height=78 border=0>;</a>;</div>;
</td>;
<td width=85%>;
<table width=100% border=0 cellspacing=0 cellpadding=0>;
<tr>;
<td>;<a title=\"".$row["name"]."\"
href=\"view.php?category=".$category."&productid=".$row["productid"]."&customerid=".$customerid."\">;<font color=ff0000>;<strong>;".$row["name"]."</strong>;</font>;</a>;</td>;
</tr>;
<tr>;
<td>;".$row["description"]."</td>;
</tr>;
<tr>;
<td>;<font color=#ff9900>;原价<s>;¥".$row["yuanjia"]."元</s>; 现价¥".$row["xianjia"]."元 会员价¥".$row["price"]."元</font>;</td>;
</tr>;
<tr>;
<td>;产品编号:".$row["bianhao"]."&&&<a title=加入购物车 href=\"javascript:popwin('addtocart.php?productid=".$row["productid"]."&customerid=".$customerid."')\">;<img src=imgs/buy1.gif width=43 height=12 border=0>;</a>;</td>;
</tr>;
</table>;
</td>;
</tr>;
<tr>;
<td background=imgs/bj01.gif colspan=2 height=2>;</td>;
</tr>;
</tbody>;
</table>;
\n";
}
?>;
</code]>;
上面是我正在使用着的页面代码,分的页是五行一列。
现需分成五行五列,却怎么弄也是报错。请大虾帮忙,感激不尽。。。 |
|