Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Private Messages - removing from Inbox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Private Messages - removing from Inbox

 Post Reply Post Reply
Author
Find-Relation View Drop Down
Groupie
Groupie


Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Find-Relation Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Find-Relation View Drop Down
Groupie
Groupie


Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Find-Relation Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (1) Thanks(1)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Find-Relation View Drop Down
Groupie
Groupie


Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Find-Relation Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (1) Thanks(1)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2011 at 11:26am
Yes this will be part of the next release.
Back to Top
Find-Relation View Drop Down
Groupie
Groupie


Joined: 06 June 2006
Location: Denmark
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Find-Relation Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (1) Thanks(1)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.