【求助】请问这句是什么意思?(内容请见内)

naiveteBOY 2004-12-09 01:22:36
这句:
onnum=conn.execute("select count(userid) from online")(0)
------------------
conn.execute(sql)(0)

后面多个(0)的,请问各位具体是什么意思?
...全文
91 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjb136 2004-12-09
  • 打赏
  • 举报
回复
说白来想当于:
conn.execute("select count(userid) as ** from online")

目的是为了便于调用吧

阿泰 2004-12-09
  • 打赏
  • 举报
回复
是的,只有这个count(userid)
naiveteBOY 2004-12-09
  • 打赏
  • 举报
回复
conn.execute("select count(userid) from online")(0)

这里好像只有1个字段,是吗?
阿泰 2004-12-09
  • 打赏
  • 举报
回复
conn.execute("select count(userid) from online") 执行完后返回一个记录集rs
conn.execute("select count(userid) from online") (0)表示执行完后的记录集的第一个字段

这句话相当于
Set rs=conn.execute("select count(userid) from online")
onnum=rs(0)

28,391

社区成员

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

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