Open only one connection

This commit is contained in:
Michael RICOIS 2014-04-07 15:05:07 +00:00
parent 3ce297dc98
commit 27a30b33eb

View File

@ -876,8 +876,9 @@ function situationJuridiqueData($siren, $nic, $values = false)
$tabData['situationParution']='';
$tabData['situationDernCode']='';
$tabData['situationDernEven']='';
$iInsee = new MInsee();
$iDb = new WDB();
foreach ($tabTmp as $sit) {
$iInsee = new MInsee();
$tmp = $iInsee->getAnnoncesLegales($siren, 0, $sit);
if (count($tmp)>0) {
$tmp=$tmp[0];
@ -889,7 +890,6 @@ function situationJuridiqueData($siren, $nic, $values = false)
}
}
if ($tabData['situationJuridique']=='NC') {
$iDb = new WDB();
$rep = $iDb->select('rncs_entrep', 'actif, dateRad', "siren='".$siren."'", false, MYSQL_ASSOC);
$entrep = $rep[0];
if (isset($entrep['actif']) && $entrep['actif']*1==0){