Correction requete nouvelle source de données

This commit is contained in:
Michael RICOIS 2016-10-28 13:11:59 +02:00
parent 8308ec7e41
commit 2976c58430

View File

@ -1686,10 +1686,10 @@ function ZonePrioritaireData($siren, $nic, $value) {
global $iDb;
$tabData = array();
$result = $iDb->select(
'etablissements e, insee.identite i',
'jo.etablissements e, insee.identite i',
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
"i.SIREN=e.siren AND i.NIC=e.nic AND e.siren=$siren AND e.nic=$nic", false, MYSQL_ASSOC);
if (count($result) > 0) {
$iAmabis = new Metier_Partenaires_MAmabis($iDb);
$tabData = $iAmabis->getZonage($result['adr_num'], $result['adr_btq'], $result['adr_typeVoie'], $result['adr_libVoie'],
@ -1708,10 +1708,10 @@ function AdresseDomData($siren, $nic, $value) {
global $iDb;
$tabData = array();
$result = $iDb->select(
'etablissements e, insee.identite i',
'jo.etablissements e, insee.identite i',
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
"i.SIREN=e.siren AND i.NIC=e.nic AND e.siren=$siren AND e.nic=$nic", false, MYSQL_ASSOC);
if (count($result) > 0) {
$c = new Metier_Insee_MInsee();
$dom = $c->infoAdresseDom($result['adr_num'], $result['adr_btq'], $result['adr_typeVoie'], $result['adr_libVoie'],
@ -1738,10 +1738,10 @@ function IrisData($siren, $nic, $values) {
global $iDb;
$tabData = array();
$result = $iDb->select(
'etablissements e, insee.identite i',
'jo.etablissements e, insee.identite i',
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
"i.SIREN=e.siren AND i.NIC=e.nic AND e.siren=$siren AND e.nic=$nic", false, MYSQL_ASSOC);
if (count($result) > 0) {
$c = new Metier_Insee_MInsee();
$tabData = $c->getInfosIris($result['ADR_DEP'].$result['ADR_COM'],