Im writing a sql string to make the Private MEssages better fit me. Below is the string I am using...
strSqL = "SELECT count(M_TO) as pmcount "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strMemberTablePrefix & "Private_Messages "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strMemberTablePrefix & "Private_Messages.M_TO "
strSql = strSql & " AND " & strMemberTablePrefix & "Private_Messages.M_RECIEVER_DELETE = '' "
strSql = strSql & " AND " & strMemberTablePrefix & "Private_Messages.M_READ = 0 "
Set rs = my_Conn.Execute(strSql)
strNewPrivateMessagesTotal = rs("pmcount")
basically what i did is set it so the members can delete the messages, but it really does not delete them till both people with the messages delete them. so in this code M_RECIEVER_DELETE would be empty or null untill the person who recieved the message deletes it. then it would insert the date. for some reason this code keeps returning 0 new messages, but when i delete the line with M_RECIEVER_DELETE it returns the right amount of new PM's.
Any ideas?
Brad