$q = $dbHandler->createSelectQuery();
$e = $q->expr;
$q->select( '*' )->from( 'table' )
->where( $e->lAnd( $e->eq( 'id', $q->bindValue( 1 ) ),
$e->eq( 'id', $q->bindValue( 2 ) ) ) );
public function lAnd()
{
$args = func_get_args();
return $this->combine($args, ' AND ');
}
public function testLOr() { $expression = new DoctrineExpression($this->connection); $this->assertEquals('( 1 AND 1 )', $expression->lAnd('1', '1')); }