sql="select count(pc_id) from pc_info" set totle6=conn.execute(sql) totle6=totle6(0) 这个是统计个人会员的人数。请教一下,这个totle6(0)是什么意思?conn.execute能得到count(pc_id)的值?
如果有多个查询字段,比如。"select id,name,content,yeaes from user",那么,rs(0)、rs(1)、rs(2),,,是否依次为各字段的值? 是是是是是是是是是是是是 貌似如此!!!等待!? sql="select count(pc_id) from pc_info" set totle6=conn.execute(sql) totle6=totle6(0) ================== 以上三行没做任何判断,可以直接简化: totle6=conn.execute("select count(pc_id) from pc_info")(0)&"" if err or totle6="" then totle6=0 ------------------------ 普通的写法就是:
sql="select count(pc_id),sum(其他字段) from pc_info" set rs=conn.execute(sql) if not rs.eof then totle6=rs(0) totle7=rs(1) else totle6=0 totle7=0 end if set rs=nothing