mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/9687] Adjust queries to be compatible with postgres
PHPBB3-9687
This commit is contained in:
@@ -750,7 +750,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
|
||||
// Delete the user_id from the banlist
|
||||
$sql = 'DELETE FROM ' . BANS_TABLE . '
|
||||
WHERE ban_mode = \'user\' AND ' . $db->sql_in_set('ban_item', $user_ids);
|
||||
WHERE ban_mode = \'user\' AND ' . $db->sql_in_set('ban_userid', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Delete the user_id from the session table
|
||||
|
@@ -115,7 +115,7 @@ abstract class base implements type_interface
|
||||
WHERE (ban_end >= ' . time() . "
|
||||
OR ban_end = 0)
|
||||
AND ban_mode = '{$this->get_type()}'
|
||||
ORDER BY ban_item";
|
||||
ORDER BY ban_item, ban_id";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rowset = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
@@ -140,7 +140,7 @@ class user extends base
|
||||
$this->banned_users = [];
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$ban_items[] = (int) $row['user_id'];
|
||||
$ban_items[] = (string) $row['user_id'];
|
||||
$this->banned_users[(int) $row['user_id']] = $row['username'];
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
Reference in New Issue
Block a user