OK. ive made this whole application. im now at the point where ive finished the comments on news articles.
but i want to show how many comments there are on that article on the mian page.
this is waht i have…
<%
set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "SELECT TOP 3 * FROM updates ORDER BY item_when DESC", Conn
If Not(RS.EOF) then
RS.MoveFirst()
%>
<div class="asset"><strong><span class="newstitle"><%= RS("item_title")%></span></strong><br><br><strong><%= RS("item_when")%> - by </strong><%= RS("item_user")%><br><br><%= RS("item_body")%> <br><br>
<a href="community/news_comment.asp?storyid=<%= RS("id")%>">Comments</a>(<% commstoryid = RS("id")
set countrecs = Server.CreateObject("ADODB.Recordset")
countrecs.Open "SELECT from comments where storyid=" & commstoryid & "", Conn, 1, 1
Response.Write "" & countrecs.recordcount & ""
countrecs.close%>)</div>
' then the rest of the code.
ive tried…
...
countrecs.Open "SELECT from comments where storyid=" & RS("id") & "", Conn, 1, 1
but it didnt work.
any help?
-Naaman