Add error management

This commit is contained in:
Laurent Destailleur 2009-10-29 00:11:52 +00:00
parent eef89437aa
commit d1e70fcd67

View File

@ -121,8 +121,9 @@ if ($filter == 'outofdate')
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
$resql = $db->query($sql);
if ($resql) $nbtotalofrecords = $db->num_rows($result);
else dol_print_error($db);
}
// Add order and limit
$sql.= " ".$db->order($sortfield,$sortorder);