diff --git a/build/exe/doliwamp/config.inc.php.install b/build/exe/doliwamp/config.inc.php.install index 19a3d36a45e..6ad04752766 100644 --- a/build/exe/doliwamp/config.inc.php.install +++ b/build/exe/doliwamp/config.inc.php.install @@ -542,7 +542,7 @@ $cfg['ThemePerServer'] = FALSE; // allow diferent theme for each co * %f will be replaced by a list of field names. * (%t and %f only applies to DefaultQueryTable) */ -$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1'; +$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1 = 1'; $cfg['DefaultQueryDatabase'] = ''; /** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fccb019a730..4148d385716 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8123,7 +8123,7 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield if (!isset($dictvalues[$tablename])) { $dictvalues[$tablename] = array(); - $sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields + $sql = 'SELECT * FROM '.$tablename.' WHERE 1 = 1'; // Here select * is allowed as it is generic code and we don't have list of fields if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')'; $resql = $db->query($sql); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index cc405571990..89995a4584e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -3320,7 +3320,7 @@ class User extends CommonObject } else { - $sql .= " WHERE 1"; + $sql .= " WHERE 1 = 1"; } // Manage filter