Perf: Amlioration perf requete
This commit is contained in:
parent
950de6f884
commit
89b8628ed5
@ -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)
|
||||
|
||||
@ -2666,10 +2666,9 @@ class Facture extends CommonObject
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = f.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)
|
||||
|
||||
@ -2045,10 +2045,9 @@ class Propal extends CommonObject
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user