public function where($predicates)
    {
        if (!(func_num_args() == 1 && $predicates instanceof CompositeExpression)) {
            $predicates = new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args());
        }

        return $this->add('where', $predicates);
    }
public function where($predicates)
    {
        if (!(func_num_args() == 1 && $predicates instanceof CompositeExpression)) {
            $predicates = new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args());
        }

        return $this->add('where', $predicates);
    }
public function where ( $ predicates ) { if ( ! ( func_num_args ( ) == 1 && $ predicates instanceof CompositeExpression ) ) { $ predicates = new CompositeExpression ( CompositeExpression :: TYPE_AND , func_get_args ( ) ) ; } return $ this -> add ( 'where' , $ predicates ) ; }
Specifies one or more restrictions to the query result.
Replaces any previously specified restrictions, if any.

<code>
$qb = $conn->createQueryBuilder()
->select('u.name')
->from('users', 'u')
->where('u.id = ?');

// You can optionally programatically build and/or expressions
$qb = $conn->createQueryBuilder();

$or = $qb->expr()->orx();
$or->add($qb->expr()->eq('u.id', 1));
$or->add($qb->expr()->eq('u.id', 2));

$qb->update('users', 'u')
->set('u.password', md5('password'))
->where($or);
</code>

@param mixed $predicates The restriction predicates.

@return \Doctrine\DBAL\Query\QueryBuilder This QueryBuilder instance.
Specifies one or more restrictions to the query result . Replaces any previously specified restrictions if any .