zf2 \Zend\Db\Sql\Sql using predicate in where condition

Asphyxiated

New Member
i really don't get the point how to use predicates in zend framework 2.this is what i got:\[code\]$sql->select() ->columns(array('GroupedColum' ,'minValue' => new Expression('min(ValueColumn)'))) ->from('ValueTable') ->group('GroupedColum') ->order('minValue') ->order('GroupedColum') ->limit(10);\[/code\]this is working finenow i want to apply somethin like that:\[code\]$predicate = new Zend\Db\Sql\Predicate\Predicate();$sql->where($predicate->greaterThan('filterColumn','20);\[/code\]this is what i tried, it throws no error, but it is not working :-(This is what i expect as SQL:\[code\]select GroupedColum , min(ValueColumn) as minValuefrom ValueTablewhere filterColumn > 20group by GroupedColumorder by minValue GroupedColumlimit 10;\[/code\]
 
Top