Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 SQL String
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 05 April 2001 :  19:09:43  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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

Goose
New Member

Denmark
74 Posts

Posted - 05 April 2001 :  19:20:02  Show Profile  Visit Goose's Homepage  Send Goose an ICQ Message
Just a thought:

Try using
Private_Messages.M_RECIEVER_DELETE IS NULL

instead of
Private_Messages.M_RECIEVER_DELETE = ''


Hope this helps.

Edited by - Goose on 05 April 2001 19:28:37
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 05 April 2001 :  19:42:44  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
thats i didnt think of that. worked perfect

Brad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07