sql count problem
when I use the following query if there is no record I get error
when I output <%=rsMsg("Msg_COUNT")%>
(either eof or bof is true.....)?
RSMsg.Open "SELECT cmm_inbox.id,cmm_inbox.status,(SELECT COUNT (*) from Cmm_inbox WHERE Cmm_inbox.Receiver =" & Session("UserID") & " ) AS Msg_COUNT FROM Cmm_Inbox where Cmm_Inbox.Receiver=" & Session("MyCmmUserID") & " and cmm_inbox.status='" & "new" & "'",conn,3,3
what should I do?
|