'bdfFibCodeEtab, bdfFibCodeGuichet, bdfFibCodeSituation AS guichetCodeSituation, bdfFibDenom40 AS guichetDenom40, bdfFibDenom20 AS guichetDenom20, bdfFibCodeEtabCible, bdfFibCodeGuichetRepr, bdfFibCodeGeoInsee, bdfFibCodeLocalite1, bdfFibCodeLocalite2, bdfFibComptoirBDF, bdfFibAdresse1 AS guichetAdresse1, bdfFibAdresse2 AS guichetAdresse2, bdfFibAdresse3 AS guichetAdresse3, CP AS guichetCP, Ville AS guichetVille, bdfFibAdresseSWIFT, bdfFibDateOuverture, bdfFibDateFermeture, bdfFibDateFinDiffus, bdfFibCodeRoutage, bdfFibLibelleRIB, bdfFibNatureGuichet, bdfFibCodeAchOperBDF, bdfFibNomComptoirBDF',
"bdfFibCodeEtab=$codeBanque AND bdfFibCodeGuichet=$codeGuichet",false,MYSQL_ASSOC);
//echo mysql_error();
if(isset($ret[0]))
$tabRet=@$ret[0];
else
$tabRet=array();
returnarray_merge($tabRet,$tabBanque,$tabTel);
}
functiongetTelGuichet($codeBanque,$codeGuichet){
$ret=$this->iDb->select('Mandel_banques',
'Tel, Fax',
"CodeB=$codeBanque AND CodeG=$codeGuichet",false,MYSQL_ASSOC);
$res=$this->iDb->select('banques','codeBanque, codeGuichet, libBanqueGuichet, precis, dateSource*1 AS dateSource',"siren=$siren",false,MYSQL_ASSOC);
$tmp=$this->iDb->select('fedRib',"codeBanque, codeGuichet, CONCAT(libBanque,' ',libGuichet) AS libBanqueGuichet, 0 AS precis, IF (dateInfo='0000-00-00', dateDispo*1, dateInfo*1) AS dateSource","siren=$siren",false,MYSQL_ASSOC);
$tmp=$this->iDb->select('insee.BDF_Etabs b, insee.BDF_Guichets g','g.bdfFibCodeEtab AS banque, g.bdfFibCodeGuichet AS guichet, b.bdfFibDenom40 AS nomBanque, b.bdfFibDenom10 AS sigleBanque, g.bdfFibDenom20 AS nomGuichet, g.bdfFibAdresse1 AS adresse1, g.bdfFibAdresse2 AS adresse2, g.bdfFibAdresse3 AS adresse3, g.CP, g.Ville',"g.bdfFibCodeEtab=$codBanque AND g.bdfFibCodeGuichet=$codGuichet AND b.bdfFibCodeEtab=g.bdfFibCodeEtab",false,MYSQL_ASSOC);
$tmp=$this->iDb->select('insee.BDF_Etabs',"bdfFibCodeEtab AS banque, '' AS guichet, bdfFibDenom40 AS nomBanque, '' AS nomGuichet, '' AS adresse1, '' AS adresse2, '' AS adresse3, '' AS CP, '' AS Ville","bdfFibCodeEtab=$codBanque",false,MYSQL_ASSOC);