zend framework2 - How can I use > and < operation in zf2 doctrine custom repository -
i want run
$qry = $qb2->where("n2.userfk!=0 , n2.id >1 <20")
in doctrine repository not working. giving error >
, <
operators.
use expressions:
$expr = $qb2->expr(); $qry = $qb2->andwhere( $expr->neq('n2.userfk', 0) $expr->andx( $expr->gt('n2.id', 1), $expr->lt('n2.id', 20) ) );
Comments
Post a Comment