@@ -52,7 +52,7 @@ if (!($haveAlreadyInseeSource)) {
//$haveAlreadySiret = $bdd->select("SELECT siret FROM employeur e WHERE siret IS NOT null FETCH FIRST 5 ROWS ONLY", [], ['fetch' => $bdd::FETCH_ONE]);
$haveAlreadySiret=$bdd->select("SELECT siret FROM (SELECT siret, rownum AS rn FROM employeur e WHERE siret IS NOT NULL) e WHERE e.rn < 10",[],['fetch'=>$bdd::FETCH_ONE]);
$haveAlreadyEmployeur=$bdd->select("SELECT * FROM employeur e");
//$haveAlreadyEmployeur = $bdd->select("SELECT * FROM employeur e");
//récupération de la liste des fichiers CSV
@@ -129,6 +129,9 @@ foreach ($listFiles as $file) {
if(empty($raisonSociale)&&empty($nomCommercial)){
continue;
}
if(!empty($siren)&&empty($siret)){
//Compilation des datas
$data=[];
$options=[];
@@ -148,6 +151,7 @@ foreach ($listFiles as $file) {
$options['where']='SIREN LIKE \''.$num.'%\' AND SOURCE_ID = (SELECT id FROM source WHERE code = \'INSEE\') AND SIREN NOT IN (\'999999999\', \'000000000000\')';