Correction retour privilèges

This commit is contained in:
Michael RICOIS 2015-04-29 09:50:32 +00:00
parent e00fbd8e12
commit 0e29030930

View File

@ -1444,8 +1444,10 @@ function privilegeData($siren, $nic, $values = false)
$iDb = new WDB('sdv1');
$sql = "SELECT count(*) AS nbPriv FROM ge_cs2 WHERE cs = 'P' AND dateFin >= NOW() AND dateSuppr=0 AND siren='$siren';";
$ret = $iDb->query($sql);
if ($ret['nbPriv']>0) {
$return = 'Oui';
if (count($ret) > 0) {
if ($ret[0]['nbPriv']>0) {
$return = 'Oui';
}
}
}
$tabData['privilege'] = $return;