mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 07:58:56 +02:00
Fix SQL problem bug #520293
git-svn-id: file:///svn/phpbb/trunk@2202 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
bab6328684
commit
aca19b4d0d
@ -698,6 +698,8 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
$update_pm_sql .= ( ( $update_pm_sql != "" ) ? ", " : "" ) . $row['privmsgs_to_userid'];
|
||||
}
|
||||
|
||||
if ( $update_pm_sql != "" )
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_new_privmsg = user_new_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
@ -705,6 +707,7 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT privmsgs_to_userid
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
@ -722,6 +725,8 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
$update_pm_sql .= ( ( $update_pm_sql != "" ) ? ", " : "" ) . $row['privmsgs_to_userid'];
|
||||
}
|
||||
|
||||
if ( $update_pm_sql != "" )
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_unread_privmsg = user_unread_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
@ -730,6 +735,7 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . "
|
||||
WHERE privmsgs_text_id IN ($delete_sql_id)";
|
||||
|
Loading…
x
Reference in New Issue
Block a user