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,12 +698,15 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
$update_pm_sql .= ( ( $update_pm_sql != "" ) ? ", " : "" ) . $row['privmsgs_to_userid'];
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_new_privmsg = user_new_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
if ( $update_pm_sql != "" )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_new_privmsg = user_new_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT privmsgs_to_userid
|
||||
@ -722,12 +725,15 @@ else if( ( $delete && $mark_list ) || $delete_all )
|
||||
$update_pm_sql .= ( ( $update_pm_sql != "" ) ? ", " : "" ) . $row['privmsgs_to_userid'];
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_unread_privmsg = user_unread_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
if ( $update_pm_sql != "" )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_unread_privmsg = user_unread_privmsg - 1
|
||||
WHERE user_id IN ($update_pm_sql)";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't update users new msg counters", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user