1
0
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:
Marc Alexander
2023-07-31 16:41:34 +02:00
parent 0414536727
commit 0be1ffd296
5 changed files with 11 additions and 7 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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);