Print Page | Close Window

Private Messages - removing from Inbox

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29561
Printed Date: 01 April 2026 at 4:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Private Messages - removing from Inbox
Posted By: Find-Relation
Subject: Private Messages - removing from Inbox
Date Posted: 24 July 2011 at 12:37pm
Hi Bruce

When a specific PM is opened from the Inbox, and you click on "delete", the Inbox-field in almost all PM's in the whole database is changed from -1 to 0, and a lot of users cant see there PM's in the Inbox.
 
If a PM is removed from the Inbox or Outbox using "delete selected", there is no problem, and only the selected PM(s) will be removed.

The problem is in both the WebWizForums on http://find-relation.dk/wiz/forum - http://find-relation.dk/wiz/forum and http://joras.dk/MySql/Forum - http://joras.dk/MySql/Forum (both using ver. 10.01 and MySql database).
 
Is that a known problem??
 
Regards Ole Dalsgaard Jensen



Replies:
Posted By: WebWiz-Bruce
Date Posted: 25 July 2011 at 9:04am
We believe that this issue is caused by the upgrade process for mySQL from a previous version to version 10.

What is happening is the inbox field is not being populated correctly when you have a large database. This issue has been fixed in the database upgrade file so that it no longer relies on mySQL to set the default value to -1 and instead a query is used to force the value.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Find-Relation
Date Posted: 25 July 2011 at 9:41am
Hi, not sure I quite understand, what I can do now.
I've manually changed the Inbox-field to -1 in all PM's using "Update tblPMMessage Set Inbox = -1"
First time an opened PM is deleted, the Inbox-field is changed again to 0 in most records in the table (not all of them!!).
To prevent that to happen again I "un-commented" 2 lines in pm_delete_message.asp from this code:
 'If PM is found
If NOT rsCommon.EOF Then
   'Update the database that this PM is no-longer available in the inbox
'    rsCommon.Fields("Inbox") = strDBFalse
'    rsCommon.Update
End If
 
Exactly what can I do now.
 
Regards Ole


Posted By: WebWiz-Bruce
Date Posted: 25 July 2011 at 10:55am
OK I understand now.

The syntax of the SQL is correct, however mySQL can be a bit buggy when using ADO for the database update.

Try replacing lines 145 to 175 in the pm_delete_message.asp file with that below:-


'Delete PM from button on the page displaying the Private Message
'(only avialble for the receiptent, not the sender)
If Request.QueryString("pm_id") <> "" AND Request.QueryString("XID") = getSessionItem("KEY") Then
   
    strSQL = "UPDATE " & strDbTable & "PMMessage " & _
    "SET " & strDbTable & "PMMessage.Inbox = " & strDBFalse & " " & _
    "WHERE " & strDbTable & "PMMessage.Author_ID = "  & lngLoggedInUserID & " " & _
        "AND " & strDbTable & "PMMessage.PM_ID = " & LngC(Request.QueryString("pm_id")) & ";"
       
    'Update PM inbox/outbox status
    adoCon.Execute(strSQL)
   
End If



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Find-Relation
Date Posted: 25 July 2011 at 11:21am
Thank you very much - It works Thumbs Up
Hope you keep that code in comming updates.
 
Regards Ole


Posted By: WebWiz-Bruce
Date Posted: 25 July 2011 at 11:26am
Yes this will be part of the next release.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Find-Relation
Date Posted: 25 July 2011 at 12:21pm
Originally posted by WebWiz-Bruce WebWiz-Bruce wrote:

... mySQL can be a bit buggy when using ADO for the database update.
Perhaps that's the reason, why Toping Rating counts wrong. All Topics have the same rating.
Nobody has complained yet, but perhaps you could think about it in the next release.
 
Regards Ole


Posted By: WebWiz-Bruce
Date Posted: 25 July 2011 at 1:01pm
Yes it looks like a bug with updating with ADO. Seems that with mySQL it is setting all topics that have 0 for the topic rating to the same value as the topic being rated.

This will be fixed for the next release.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net