asp代码高手进

2025-04-08 21:42:01
推荐回答(2个)
回答1:

set rs2=server.createobject("adodb.recordset")

rs2.open sql,conn,1,1
response.write conn.execute("select count(*) as sum from Mobile_photo where p_fxdate='2006-10-10' and p_jzdate='2006-10-16' and p_fxz='00'")

改成

set rs = conn.execute("select count(*) as sum from Mobile_photo where p_fxdate='2006-10-10' and p_jzdate='2006-10-16' and p_fxz='00'")

response.write rs("sum")

回答2:

dim rsCount
set rsCount = conn.execute("select count(*) as sum from Mobile_photo where p_fxdate='2006-10-10' and p_jzdate='2006-10-16' and p_fxz='00'")
if rsCount.eof then response.write rsCount(0)
set rsCount = nothing