Nouvelle source : récuperer les résultats depuis la première ligne
This commit is contained in:
parent
2976c58430
commit
05e6aff83f
@ -1691,9 +1691,10 @@ function ZonePrioritaireData($siren, $nic, $value) {
|
||||
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 e.siren=$siren AND e.nic=$nic", false, MYSQL_ASSOC);
|
||||
if (count($result) > 0) {
|
||||
$r = $result[0];
|
||||
$iAmabis = new Metier_Partenaires_MAmabis($iDb);
|
||||
$tabData = $iAmabis->getZonage($result['adr_num'], $result['adr_btq'], $result['adr_typeVoie'], $result['adr_libVoie'],
|
||||
$result['adr_cp'], $result['adr_ville'], trim($result['ADR_DEP'].$result['ADR_COM'].$result['CODEVOIE']),
|
||||
$tabData = $iAmabis->getZonage($r['adr_num'], $r['adr_btq'], $r['adr_typeVoie'], $r['adr_libVoie'],
|
||||
$r['adr_cp'], $r['adr_ville'], trim($r['ADR_DEP'].$r['ADR_COM'].$r['CODEVOIE']),
|
||||
false, 'TEST', false);
|
||||
}
|
||||
return $tabData;
|
||||
@ -1713,9 +1714,10 @@ function AdresseDomData($siren, $nic, $value) {
|
||||
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 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'],
|
||||
$result['adr_cp'], $result['adr_ville']);
|
||||
$r = $result[0];
|
||||
$c = new Metier_Insee_MInsee($iDb);
|
||||
$dom = $c->infoAdresseDom($r['adr_num'], $r['adr_btq'], $r['adr_typeVoie'], $r['adr_libVoie'],
|
||||
$r['adr_cp'], $r['adr_ville']);
|
||||
$tabData['AdresseDomNb'] = $dom['nbEntrep'];
|
||||
}
|
||||
|
||||
@ -1743,10 +1745,10 @@ function IrisData($siren, $nic, $values) {
|
||||
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 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'],
|
||||
substr($result['CODEVOIE'],0,4), $result['adr_num'], $result['adr_btq'],
|
||||
$result['adr_typeVoie'], $result['adr_libVoie']);
|
||||
$r = $result[0];
|
||||
$c = new Metier_Insee_MInsee($iDb);
|
||||
$tabData = $c->getInfosIris($r['ADR_DEP'].$r['ADR_COM'],substr($r['CODEVOIE'],0,4),
|
||||
$r['adr_num'], $r['adr_btq'], $r['adr_typeVoie'], $r['adr_libVoie']);
|
||||
}
|
||||
|
||||
return $tabData;
|
||||
|
Loading…
Reference in New Issue
Block a user