<%
sql = "SELECT COUNT(ID) FROM [c_Favorite] "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
Dim FavTotal
FavTotal = COUNT(ID)
Response.write(FavTotal)
Response.End()
%>
怎么打印说类型不匹配: 'COUNT '。
请问如何打印 COUNT(ID)
急急急
------解决方案--------------------
<%
sql = "SELECT COUNT(ID) AS count_id FROM [c_Favorite] "
set rs=server.createobject( "adodb.recordset ")
rs.open sql,conn,1,3
Dim FavTotal
FavTotal = rs( "count_id ")
Response.write(FavTotal)
Response.End()
%>