mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Perf: Amlioration perf requete
This commit is contained in:
@@ -2284,10 +2284,9 @@ class Commande extends CommonObject
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = co.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cp.fk_categorie = c.rowid";
|
||||
}
|
||||
$sql.= " WHERE 1 = 1";
|
||||
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||
{
|
||||
$sql.= " AND IFNULL(c.visible,1)=1";
|
||||
$sql.= " WHERE IFNULL(c.visible,1)=1";
|
||||
}
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
Reference in New Issue
Block a user