这个ASP语句应该怎么修改啊

来源:百度知道 编辑:UC知道 时间:2024/06/23 12:07:45
<!--------------------显示最新产品的子程序开始--------------------->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & Product_count & " * from Product where Passed="&TrueType&" And FirstPage="&TrueType&" order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<tr align="center">
<%
If rs_Product.eof and rs_Product.bof then
response.write "<td><p align='center'><font color='#ff0000'>还没任何产品</font></p></td>"
else
row_count=1
Do While Not rs_Product.EOF%>

<% if row_count mod 4 =0 then%>

"select top " & Product_count &
你得注意下Product_count的值,应该设置Product_count为12就可以了。

显示四行是吧!
你直接修改
Product_count 的值就行了!4行就改成 :

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
Product_count=12
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & Product_count & " * from Product where Passed="&TrueType&" And FirstPage="&TrueType&" order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<tr align="center">
<%
If rs_Product.eof and rs_Product.bof then
response.write "<td><p align='center'><font color='#ff0000'>还没任何产品</font></p></td>"
else
row_count=1
Do While Not rs_Product.EOF%>
<td>