diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c1960a0c5e9..3db787bbcc2 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1050,8 +1050,8 @@ if ($search_fk_input_reason > 0) { if ($search_user > 0) { $sql .= " AND EXISTS ("; $sql .= " SELECT ec.fk_c_type_contact, ec.element_id, ec.fk_socpeople"; - $sql .= " FROM llx_element_contact as ec"; - $sql .= " INNER JOIN llx_c_type_contact as tc"; + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql .= " ON ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal'"; $sql .= " WHERE ec.element_id = c.rowid AND ec.fk_socpeople = ".((int) $search_user).")"; }