how to count records in ASP classic?

前端 未结 9 985
陌清茗
陌清茗 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 03:13

    <% ' TableID = your tables ID...

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

    %>

提交回复
热议问题