No ORDER BY needed for a COUNT sql, causes PGSQL error

This commit is contained in:
Maxime Kohlhaas 2016-09-15 12:08:47 +02:00
parent ff632718fa
commit 5840ed8258

View File

@ -411,7 +411,6 @@ if ($object->id > 0)
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
$sql.= " WHERE p.fk_soc =".$object->id;
$sql.= " AND p.entity =".$conf->entity;
$sql.= " ORDER BY p.date_commande DESC";
$resql=$db->query($sql);
if ($resql)
{