FIX missing table alias

This commit is contained in:
Regis Houssin 2022-03-24 16:54:02 +01:00
parent e8dae7a8db
commit 6fdb140f04

View File

@ -4413,7 +4413,7 @@ abstract class CommonObject
$sql.= " AND c.".$element['parentkey']." = p.rowid"; $sql.= " AND c.".$element['parentkey']." = p.rowid";
} }
if (!empty($entity)) { if (!empty($entity)) {
$sql.= " AND entity = ".((int) $entity); $sql.= " AND p.entity = ".((int) $entity);
} }
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) { if ($resql) {