继续上面的问题。。

huhacoca 2010-09-09 10:42:49
<%
dim id
id=request.querystring("id")
'session("id")=id
call ConnectionDatabase
'创建对象
Set mypage=new xdownpage
'得到数据库连接
mypage.GetConn=conn
'sql语句
mypage.getsql="select * from yx_pic where cid=8 and id='"&id&"' order by orderid asc,id desc"
'设置每一页的记录条数据为5条
mypage.pagesize=20
'返回Recordset
set rs=mypage.getrs()
'显示分页信息,这个方法可以,在set rs=mypage.getrs()以后,可在任意位置调用,可以调用多次
mypage.showpage()
'显示数据
for i=1 to mypage.pagesize
'这里就可以自定义显示方式了
if not rs.eof then
%>
<td><table width="100%" border="0" cellpadding="4" cellspacing="0" class="table2_2">
<tr>
<td align="center"><a href="<%=rs("picurl")%>" target="_blank" class="group1"><img name="" src="<%=rs("picurl")%>" width="121" height="124" alt="" class="img1" /></a></td>
</tr>
<tr>
<td align="center"><a href="<%=rs("picurl")%>" target="_blank"><%=rs("titles")%></a></td>
</tr>
</table></td>
<%
if i mod 4 = 0 then
Response.Write("</tr><tr>")
end if
rs.movenext
else
exit for
end if
next
'rs.close
'conn.close()
%>
</tr>
</table>
<table width="620" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>


标记红色那里,如果我直接改成ID=57,就可以显示信息,但是我点击ID是57的这个地址,用 id='"&id&"'传递过来,却没有任何显示
...全文
34 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
beyond_me21 2010-09-09
  • 打赏
  • 举报
回复
id="&id&"
数字类型,去掉单引号

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧