how to count records in ASP classic?

前端 未结 9 1006
陌清茗
陌清茗 2021-01-14 02:50

I\'m not quite familiar with programming ASP classic. I just need a small code to run on my webpage. How do i count the record of the returned query?

<%
S         


        
9条回答
  •  旧巷少年郎
    2021-01-14 02:56

    If you are using MySQL try this:

    Dim strSQLscroll, rsscroll, countrs
    
    Set rsscroll = Server.CreateObject("ADODB.Recordset")
    rsscroll.CursorLocation = 3
    rsscroll.open "SELECT * FROM tblItems where expiration_date > getdate()
    order by expiration_date desc;",oConn
    
    countrs = rsscroll.recordcount
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题