mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Oops, I forgot the negate bit in sql_in_set()
git-svn-id: file:///svn/phpbb/trunk@6262 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -285,7 +285,7 @@ class dbal
|
||||
return $query;
|
||||
}
|
||||
|
||||
function sql_in_set($field, $array)
|
||||
function sql_in_set($field, $array, $negate = false)
|
||||
{
|
||||
if (!sizeof($array))
|
||||
{
|
||||
@@ -320,11 +320,11 @@ class dbal
|
||||
|
||||
if (sizeof($values) == 1)
|
||||
{
|
||||
return $field . ' = ' . $values[0];
|
||||
return $field . ($negate ? ' <> ' : ' = ') . $values[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
return $field . ' IN (' . implode(',', $values) . ')';
|
||||
return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(',', $values) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user