diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index 415cc7a0c02..43e0e6d34ba 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -21,7 +21,8 @@ * */ -/** \file htdocs/comm/clients.php +/** + \file htdocs/comm/clients.php \ingroup commercial, societe \brief Liste des clients \version $Revision$ @@ -80,14 +81,8 @@ if ($socname) $sortorder = "ASC"; } -if ($sortorder == "") -{ - $sortorder="ASC"; -} -if ($sortfield == "") -{ - $sortfield="s.nom"; -} +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="s.nom"; $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset); @@ -95,7 +90,7 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); llxHeader(); @@ -107,14 +102,16 @@ if ($result) print '