<%@language="javascript" %> <% dbConn = Server.CreateObject("ADODB.Connection") dbConn.Open("tj") tid = Request.QueryString("tid"); var username = "thomtrance"; tsqlstr = "Select * FROM thought where thoughtid = "+tid ; TRS = dbConn.Execute(tsqlstr); csqlstr = "Select * FROM comment where thoughtid = "+tid ; CRS = dbConn.Execute(csqlstr); catid = TRS.Fields("categoryid"); RScatid = dbConn.Execute("Select * FROM category where categoryid="+catid) catTitle = RScatid.Fields("category"); catudk=RScatid.Fields("catudk"); linecntr=0 ; vysqlstr = "Select count(*) as vote FROM vote where vote=1 and thoughtid = "+tid ; VYRS = dbConn.Execute(vysqlstr); var vy= 0; if (VYRS.EOF&&VYRS.BOF){ vy = 0; }else{ vy = VYRS("vote") } vnsqlstr = "Select count(*) as vote FROM vote where vote=0 and thoughtid = "+tid ; VNRS = dbConn.Execute(vnsqlstr); var vn = 0; if (VNRS.EOF&&VNRS.BOF){ vn = 0; }else{ vn = VNRS("vote") } fysqlstr = "Select count(*) as fund FROM vote where fund=1 and thoughtid = "+tid ; FYRS = dbConn.Execute(fysqlstr); var fy = 0; if (FYRS.EOF&&FYRS.BOF){ fy = 0; }else{ fy = FYRS("fund") } fnsqlstr = "Select count(*) as fund FROM vote where fund=0 and thoughtid = "+tid ; FNRS = dbConn.Execute(fnsqlstr); var fn=0; if (FNRS.EOF&&FNRS.BOF){ fn = 0; }else{ fn = FNRS("fund") } %> Annotated Comments
<%=catTitle%>::<%=TRS("title")%> Comment!
Other Categories:
<%=TRS("title")%> <%=TRS("username")%> <%=TRS("datecreated")%>
<%=TRS("thought")%>
Vote: Yes
<%=vy%>
No
<%=vn%>
Fund Yes
<%=fy%>
No
<%=fn%>

Comments on this thought:: <% while(!CRS.EOF){ linecntr = linecntr + 1 if ( linecntr % 2 == 1 ) { bkclass = "row1" } else{ bkclass = "row2" } %> > <% CRS.MoveNext() ; } CRS.close() RScatid.close(); TRS.Close(); VYRS.close(); VNRS.Close(); FYRS.Close() FNRS.Close(); dbConn.Close(); %>
<%= CRS("username")%>

<%= CRS("datecreated")%>
<%= CRS("comment")%>