Ajout verif présence lignes

This commit is contained in:
Rodolphe Quiedeville 2005-12-06 15:34:04 +00:00
parent 909d97cd9a
commit 8078b272e9

View File

@ -56,12 +56,25 @@ if ( $resql )
{ {
$rows = $db->fetch_row($resqls); $rows = $db->fetch_row($resqls);
if ($rows[0] == 0) if ($rows[0] == 0)
{
$sqll = "SELECT count(*)";
$sqll .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne";
$sqll .= " WHERE fk_contrat =".$row[0];
$sqll .= " AND statut = 3;";
$resqll = $db->query($sqll) ;
if ( $resqll )
{
$rowl = $db->fetch_row($resqll);
if ($rowl[0] > 0)
{ {
print "Contrat ".$row[0]." sans contact ni envoi courrier\n"; print "Contrat ".$row[0]." sans contact ni envoi courrier\n";
} }
} }
} }
} }
}
}
else else
{ {
print $db->error(); print $db->error();