编程论坛
注册
登录
编程论坛
→
ASP技术论坛
数据库问题
jpeining
发布于 2008-05-04 07:20, 408 次点击
数据库中ID为偶数的记录是如何输出的呢?
1 回复
#2
hmhz
2008-05-04 08:10
<%
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select id from Product order by id desc",conn,1,1
do while not rs.eof
if rs("id") mod 2<>0 then
response.write rs("id")&"<br>"
rs.movenext
loop
rs.close
set rs=nothing
%>
1