1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

functions.inc.php:

- db_where_clause(): wrap condition in "(...)"


model/PFAHandler.php:
- read_from_db(): wrap condition in "(...)"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1493 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2013-06-23 20:02:05 +00:00
parent 3b7606b654
commit 414c05e678
2 changed files with 2 additions and 4 deletions

View File

@@ -1651,7 +1651,7 @@ function db_where_clause($condition, $struct) {
if (isset($struct[$field]) && $struct[$field]['type'] == 'bool') $value = db_get_boolean($value);
$parts[] = "$field='" . escape_string($value) . "'";
}
$query = " WHERE " . join(" AND ", $parts) . " ";
$query = " WHERE ( " . join(" AND ", $parts) . " ) ";
return $query;
}