Doctrine\DBAL\Query\QueryBuilder::where
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>
Signature
public function where(mixed
$predicates )
Parameters
$predicates
— mixed- The restriction predicates.
Returns
- QueryBuilder
- This QueryBuilder instance.