This commit is contained in:
Michael RICOIS 2014-05-07 09:37:37 +00:00
parent ff6a4dcdad
commit e5265a6524

View File

@ -1610,7 +1610,7 @@ class MInsee
$limit="LIMIT $deb, $nbRep";
$sqlInfo="e.id, e.source, e.source_id, e.triCode, e.autre_id, LPAD(e.siren, 9, 0) as siren, LPAD(e.nic, 5, 0) as nic, e.siege, ".
"e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, LPAD(e.adr_typeVoie,0,4) AS adr_typeVoie, e.adr_libVoie, ".
"e.raisonSociale, e.enseigne, e.sigle, 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, e.adr_dep, e.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(siren, nic) as siret, e.actif, e.identite_pre, IF(e.siege=2,0.5,e.siege) AS triSiege";
@ -1779,7 +1779,7 @@ class MInsee
$nbTot=$tabTmp[0][0];
$listeEtab=$this->iDb->select('etablissements e',
"'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, LPAD(e.siren, 9, 0) as siren, LPAD(e.nic, 5, 0), e.siege, ".
"e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
"e.raisonSociale, e.enseigne, e.sigle, 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, e.adr_dep, e.adr_com, LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep,".
"CONCAT(e.siren, e.nic) as siret, e.actif",
"TEL=$id OR FAX=$id $filtreActif ORDER BY e.siege DESC, e.actif DESC $limit", false, MYSQL_ASSOC);
@ -1813,7 +1813,7 @@ class MInsee
$nbTot=$tabTmp[0][0];
$listeEtab=$this->iDb->select('etablissements e',
"'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, e.siren, e.nic, e.siege, ".
"e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
"e.raisonSociale, e.enseigne, e.sigle, 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, e.adr_dep, e.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",
"autre_id IN ('$strId') $filtreActif $strDep ORDER BY siege DESC $limit", false, MYSQL_ASSOC);