100分 ASP 求救
本人不会ASP
求解这段代码有错吗? 有错的话帮忙修改下
要实现的功能是 获取得到Smallclassname的直 得到直后 将数据查出来
现在这问题是 直得到了 但是数据没有出来。
在线等待。。。。。。
<%
Smallclassname=Trim(request("Smallclassname"))
%>
<%set rk=server.createobject("adodb.recordset")
rk.open "select * from product where Smallclassname='"&Smallclassname&"' order by UpdateTime desc",conn,1,1
if rk.recordcount=0 then
%>
<td height="26" align="center">暂无商品</td>
</tr>
</table>
<%
else
rk.PageSize =6 '每页记录条数
iCount=rk.RecordCount '记录总数
iPageSize=rk.PageSize
maxpage=rk.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rk.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
<table width="27%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<%
ii=0
For i=1 To x
%>
<td width="33%" valign="top" ><table width="120" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="124" height="153" align="center" valign="middle" style="padding-top:15px;"><table width="751" border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr>
<td width="129" height="101" align="center" valign="middle" style="border:#CCCCCC solid 1px;" ><a href='ProductShow.asp?BigClassName=<%=rk("BigClassName")%>&SmallClassName=<%=rk("SmallClassName")%>&ID=<%=rk("ID")%>' title='<%=rk("title")%>'><img src="<%=trim(rk("DefaultPicUrl"))%>" width="124" height="124" border="0" /></a></td>
<td width="622" align="left" valign="top" style="padding-left:12px; padding-top:10px;"><table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" class="STYLE1" style="font-weight: bold"><%=Left(rk("title"),19)%></td>
</tr>
<tr>
<td height="20" class="tt">价格范围:<%=Left(rk("price"),19)%></td>
</tr>
<tr>
<td height="20" class="tt">推荐理由:</td>
</tr>
<tr>
<td class="tt"><table width="100%" border="0" cellspacing="0">
<tr>
<td width="77%" style=" line-height:18px; font-size:12px; color:#333333;"><%=Left(rk("content"),99)%></td>
<td width="23%" align="right" valign="bottom"><a href='ProductShow.asp?id=<%=rk("id")%>' title='<%=rk("title")%>'>更多详细 >></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" colspan="2" align="center" valign="middle" style="border-bottom:#CCCCCC dashed 1px;" > </td>
</tr>
</tbody>
</table></td>
</tr>
</table></td>
<%rk.movenext
ii=ii+1%>
<%if ii mod 1 =0 then%>
</tr>
<tr>
<%end if%>
<% next%>
<td height="0" colspan="2" ></td>
</tr>
</table>