FIX: pgsql: prevent 'WHERE 1'

This commit is contained in:
Marc de Lima Lucio
2021-05-05 11:49:11 +02:00
parent e6b4f1eab6
commit 139ae3db00
3 changed files with 3 additions and 3 deletions

View File

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