Mhtml
12-01-2002, 08:19 AM
Well, I thought I had it but obviously I don't because I have run into a problem.
Why is this repeating each post for each person in the users database instead of adding the appropriate user name?
GetReplies = "SELECT Replies.*, Users.* FROM Replies, Users WHERE ToThread = " & Request.QueryString("ThreadId")
rs.Open GetReplies, conn
Do While not rs.eof
Icon = "<!--No Icon--->"
%> <tr>
<td background="skins/ICE/bgtopic03.gif" width="26" height="25" align="center" valign="middle" class="BorderLeftWhite , BorderBottomWhite"><%=Icon%></td>
<td background="skins/ICE/bgtopic03.gif" width="420" class="BorderBottomWhite" valign="middle"><strong><font color="104477" size="2" face="Arial, Helvetica, sans-serif"><%=rs("UserName")%></font></strong></td>
<td background="skins/ICE/bgtopic03.gif" width="218" align="right" valign="middle" class="BorderRightWhite , BorderBottomWhite"><strong><font color="104477" size="2" face="Arial, Helvetica, sans-serif">Edit
</font></strong></td>
</tr>
<tr>
<td colspan="3" bgColor="e2e9ed">
<font class="DescText">
<%=rs("ReplyMessage")%>
</font>
</td></tr>
<tr>
<td class="BorderLeftWhite , BorderRightWhite , BorderBottomWhite" colspan="3" bgcolor="e2e9ed" align="right"><br><a class="MiniLink" href="modreport.asp?ReplyId=<%=rs("ReplyId")%>">Report this post to a moderator</a> <font class="DescText , FontColor808080">|</font> <a class="MiniLink" href="admodPost.asp?ReplyId=<%=rs("ReplyId")%>">Admin/Mod Options</a></td>
</tr>
<%
rs.MoveNext
loop
%>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
I've attached the appropriate files including the database if you would like to see the problem for yourself.
Why is this repeating each post for each person in the users database instead of adding the appropriate user name?
GetReplies = "SELECT Replies.*, Users.* FROM Replies, Users WHERE ToThread = " & Request.QueryString("ThreadId")
rs.Open GetReplies, conn
Do While not rs.eof
Icon = "<!--No Icon--->"
%> <tr>
<td background="skins/ICE/bgtopic03.gif" width="26" height="25" align="center" valign="middle" class="BorderLeftWhite , BorderBottomWhite"><%=Icon%></td>
<td background="skins/ICE/bgtopic03.gif" width="420" class="BorderBottomWhite" valign="middle"><strong><font color="104477" size="2" face="Arial, Helvetica, sans-serif"><%=rs("UserName")%></font></strong></td>
<td background="skins/ICE/bgtopic03.gif" width="218" align="right" valign="middle" class="BorderRightWhite , BorderBottomWhite"><strong><font color="104477" size="2" face="Arial, Helvetica, sans-serif">Edit
</font></strong></td>
</tr>
<tr>
<td colspan="3" bgColor="e2e9ed">
<font class="DescText">
<%=rs("ReplyMessage")%>
</font>
</td></tr>
<tr>
<td class="BorderLeftWhite , BorderRightWhite , BorderBottomWhite" colspan="3" bgcolor="e2e9ed" align="right"><br><a class="MiniLink" href="modreport.asp?ReplyId=<%=rs("ReplyId")%>">Report this post to a moderator</a> <font class="DescText , FontColor808080">|</font> <a class="MiniLink" href="admodPost.asp?ReplyId=<%=rs("ReplyId")%>">Admin/Mod Options</a></td>
</tr>
<%
rs.MoveNext
loop
%>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
I've attached the appropriate files including the database if you would like to see the problem for yourself.