erreur de syntaxe
This commit is contained in:
parent
893c79a2ca
commit
34c6644970
@ -72,17 +72,19 @@ class CriteresController extends Zend_Controller_Action
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$niveau = $request->getParam('niveau', 1);
|
||||
$request = $this->getRequest();
|
||||
$niveau = $request->getParam('niveau', 1);
|
||||
$parent = $request->getParam('parent', '');
|
||||
$nafM = new Application_Model_Naf();
|
||||
$sql = $nafM->select();
|
||||
$niveau++;
|
||||
$parent = $request->getParam('parent', '');
|
||||
$nafM = new Application_Model_Naf();
|
||||
$sql = $nafM->select();
|
||||
|
||||
if (!empty($parent) && $niveau==2) {
|
||||
$sql->where('parent = ?', $parent);
|
||||
} elseif (!empty($parent) && $niveau>2) {
|
||||
$sql->where("code LIKE '".$parent."%'");
|
||||
}
|
||||
|
||||
$sql->where('niveau = ?', $niveau)->order('code ASC');
|
||||
|
||||
$result = $nafM->fetchAll($sql)->toArray();
|
||||
|
Loading…
Reference in New Issue
Block a user