Originally posted by spyderukEven though I agree with the previous comments about locking him without many hesitations, you could code it like this:
Ah so the proposed change would go in here somewhere? Maybe an if, else statement. Sorry my asp knowledge is very bad.
sub doUCount(sUser_Name)
'## Forum_SQL - Update Total Post for user
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = M_POSTS + 1 "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(sUser_Name, "SQLString") & "'"
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
sub doUCount(sUser_Name)
'## Forum_SQL - Update Total Post for user
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = M_POSTS + 1 "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(sUser_Name, "SQLString") & "'"
If MemberId<>xxx then
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
end sub
Originally posted by AnonJrWhere?
Correct me if I'm wrong, but wouldn't that only execute the query if the Member ID is the one in question? thereby only incrementing that member's post count?