Evite de planter la requete si il y a un doublon dans la liste des pays

This commit is contained in:
Michael RICOIS 2017-01-05 08:14:31 +01:00
parent df53fd0171
commit 7db57802b6

View File

@ -987,7 +987,7 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, e.adr_dep, LPAD(e.adr_com,3,0) AS adr_com,
LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, e.teff_etab,
CONCAT(e.siren, e.nic) AS siret, e.actif, e.identite_pre, IF(e.siege=2,0.5,e.siege) AS triSiege,
IF (e.adr_dep=99, (SELECT libPays FROM jo.tabPays p WHERE p.codePaysInsee=e.adr_com) , 'France') AS libPays";
IF (e.adr_dep=99, (SELECT libPays FROM jo.tabPays p WHERE p.codePaysInsee=e.adr_com LIMIT 0,1) , 'France') AS libPays";
$strActif = $strDep = '';
if (intval($actif) == 1) {