Affichage code géographique
This commit is contained in:
parent
e1fdcf662e
commit
6900b9a18b
@ -1129,13 +1129,16 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
switch( substr($item,0,1) ) {
|
||||
case 'C':
|
||||
$communeM = new Application_Model_CodePostaux();
|
||||
$sql = $communeM->select()->from($communeM, array('Commune'))->where('INSEE = ?', substr($item, 1));
|
||||
$sql = $communeM->select()->from($communeM, array('Commune', 'Codepos'))
|
||||
->where('INSEE = ?', substr($item, 1));
|
||||
$result = $communeM->fetchAll($sql)->toArray();
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$out[] = $result[0]['Commune'].' ('.$result[0]['Codepos'].')';
|
||||
break;
|
||||
case 'D':
|
||||
$departementsM = new Application_Model_Departements();
|
||||
$sql = $departementsM->select()->from($departementsM, array('libdep'))->where('numdep = ?', substr($item, 1));
|
||||
$sql = $departementsM->select()->from($departementsM, array('libdep', 'numdep'))
|
||||
->where('numdep = ?', substr($item, 1));
|
||||
$result = $departementsM->fetchAll($sql)->toArray();
|
||||
$out[] = $result[0]['libdep'].' ('.$result[0]['numdep'].')';
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user