Icy Phoenix

     
 

Error Counting Unread Private Messages

Error Counting Unread Private Messages

Article
Reply with quote    Download Post  
Post Error Counting Unread Private Messages 
 
Hi all, Yesterday, one user reported this error:

Quote:
SQL ERROR [ mysql4 ]

BIGINT UNSIGNED value is out of range in '(`clubtwo3_club205`.`ip_users`.`user_unread_privmsg` - 1)' [1690]

SQL

UPDATE ip_users SET user_unread_privmsg = user_unread_privmsg - 1 WHERE user_id = 1262

BACKTRACE


FILE: includes/db/mysql.php
LINE: 295
CALL: sql_db->sql_error()

FILE: privmsg.php
LINE: 309
CALL: sql_db->sql_query()


I made a research. The user had one unread message, but 0 marked at his ip_user table's record, so when he tries to read it, system fails while trying to make 0 -1 in an unsigned bigint.

I solved this making this record + 1 by myself for this user, and other one with the same problem. By now, only two users reported this problem, and I do not know where can be the error counting this. I was thinking and these weeks I noticed that users are sending two times the request to the server. This is caused because if the user's screen didn't changed fast, they click again the link, and the same action is executed 2 times. I have seen several duplicated messages on the forum. I think something similar could happen here when the same user clicks on an unread message, and the system decreases it but not showed, so the patience less user clicked again, decreasing two times the counter. This could only happend if the user had more than 1 unread private message.

Did someone else saw the same error?



 
jefazo666 - View user's profile Send private message  
jefazo666 [ Tue 29 Jan, 2013 00:12 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


Error Counting Unread Private Messages

Comments
Reply with quote    Download Post  
Post Re: Error Counting Unread Private Messages 
 
I one time had the same problem with postcount. Need either to specialcase it in php or in sql.



 
Informpro - View user's profile Send private message  
Informpro [ Tue 29 Jan, 2013 12:53 ]
Reply with quote    Download Post  
Post Re: Error Counting Unread Private Messages 
 
Very strange... I'll think to a way to fix this.



 
Mighty Gorgon - View user's profile Send private message  
Mighty Gorgon [ Tue 19 Feb, 2013 23:20 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron