Change SQL request to display preview
This commit is contained in:
parent
0f922f7d02
commit
c343c5197a
@ -222,8 +222,18 @@ class ComptageController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
$sql = $dbMetier->select()
|
||||
->from('etablissements_act', $extractSql)
|
||||
->where('concat(siren, nic) IN('.join(',', $sirets).')');
|
||||
->from('etablissements_act', $extractSql);
|
||||
|
||||
$i = 0;
|
||||
$where = '';
|
||||
foreach($sirets as $siret) {
|
||||
if ($i>0) {
|
||||
$where.=' OR ';
|
||||
}
|
||||
$where.= "(siren='".substr($siret,0,9)."' AND nic='".substr($siret,9,5)."')";
|
||||
$i++;
|
||||
}
|
||||
$sql->where($where);
|
||||
|
||||
$result = $dbMetier->fetchAll($sql);
|
||||
$liste = array();
|
||||
|
Loading…
Reference in New Issue
Block a user