| Author |
Topic Search Topic Options
|
Find-Relation
Groupie
Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
|
Post Options
Thanks(0)
Quote Reply
Topic: Private Messages - removing from Inbox 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
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |
Find-Relation
Groupie
Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(1)
Quote Reply
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
|
|
|
|
 |
Find-Relation
Groupie
Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 July 2011 at 11:21am |
Thank you very much - It works
 Hope you keep that code in comming updates. Regards Ole
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(1)
Quote Reply
Posted: 25 July 2011 at 11:26am |
|
Yes this will be part of the next release.
|
|
|
 |
Find-Relation
Groupie
Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 July 2011 at 12:21pm |
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
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(1)
Quote Reply
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.
|
|
|
 |