Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions lib/Doctrine/DBAL/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ public function delete($delete = null, $alias = null)
*
* <code>
* $qb = $conn->createQueryBuilder()
* ->update('users', 'u')
* ->set('u.last_login', 'NOW()')
* ->where('u.id = ?');
* ->update('counters', 'c')
* ->set('c.value', 'c.value + 1')
* ->where('c.id = ?');
* </code>
*
* @param string $update The table whose rows are subject to the update.
Expand Down Expand Up @@ -745,9 +745,9 @@ public function rightJoin($fromAlias, $join, $alias, $condition = null)
*
* <code>
* $qb = $conn->createQueryBuilder()
* ->update('users', 'u')
* ->set('u.last_login', 'NOW()')
* ->where('u.id = ?');
* ->update('counters', 'c')
* ->set('c.value', 'c.value + 1')
* ->where('c.id = ?');
* </code>
*
* @param string $key The column to set.
Expand All @@ -766,19 +766,19 @@ public function set($key, $value)
*
* <code>
* $qb = $conn->createQueryBuilder()
* ->select('u.name')
* ->from('users', 'u')
* ->where('u.id = ?');
* ->select('c.value')
* ->from('counters', 'c')
* ->where('c.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));
* $or->add($qb->expr()->eq('c.id', 1));
* $or->add($qb->expr()->eq('c.id', 2));
*
* $qb->update('users', 'u')
* ->set('u.last_login', 'NOW()')
* $qb->update('counters', 'c')
* ->set('c.value', 'c.value + 1')
* ->where($or);
* </code>
*
Expand Down