如何得到一堆记录的数量

伊凡yifan 2004-03-04 05:27:29

<%

public Function UserCount(userstr)


ourssql = "select DISTINCT PHONE_FROM from SENDimgOP where partner_account = '"&userstr&"' and phone_from is not null and is_valid = 1 union select DISTINCT PHONE_FROM from SENDringOP where partner_account = '"&userstr&"' and phone_from is not null and is_valid = 1 union select DISTINCT PHONE_FROM from SENDTEXTOP where partner_account = '"&userstr&"' and phone_from is not null and is_valid = 1"


set myUsercount =conn.execute(ourssql)
'UserCount = myUserCount.count
'UserCount = myUserCount.RecordCount
UserCount = myUserCount.Fields("PHONE_FROM").Count
'UserCount = myUsercount("PHONE_FROM")
End Function


%>
...全文
33 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

34,587

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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