For example:
if(!empty($this->_request->getParam('gadi_from'))) {$select->where('a.gadi > ?',trim((int)$this->_request->getParam('gadi_from')));}
if(!empty($this->_request->getParam('gadi_to'))) {$select->where('a.gadi < ?',trim((int)$this->_request->getParam('gadi_to')));}
But the problem is, it's isn't working that way. :)
I'm getting this error: Fatal error: Can't use method return value in write context in C: bla-bla-bla on line bla-bla-bla :)
This variant is working:
$gadi_from = trim((int)$this->_request->getParam('gadi_from'));
$gadi_to = trim((int)$this->_request->getParam('gadi_to'));
if(!empty($gadi_from)) {$select->where('a.gadi > ?',$gadi_from );}
if(!empty($gadi_to)) {$select->where('a.gadi < ?',$gadi_to );}