Unverified Commit 2d3c0f15 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3232 from morozov/remove-now

Removed NOW() from QueryBuilder usage examples
parents 54054275 aa25877a
......@@ -552,9 +552,9 @@ class QueryBuilder
*
* <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.
......@@ -745,9 +745,9 @@ class QueryBuilder
*
* <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.
......@@ -766,19 +766,19 @@ class QueryBuilder
*
* <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>
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment