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 ...@@ -552,9 +552,9 @@ class QueryBuilder
* *
* <code> * <code>
* $qb = $conn->createQueryBuilder() * $qb = $conn->createQueryBuilder()
* ->update('users', 'u') * ->update('counters', 'c')
* ->set('u.last_login', 'NOW()') * ->set('c.value', 'c.value + 1')
* ->where('u.id = ?'); * ->where('c.id = ?');
* </code> * </code>
* *
* @param string $update The table whose rows are subject to the update. * @param string $update The table whose rows are subject to the update.
...@@ -745,9 +745,9 @@ class QueryBuilder ...@@ -745,9 +745,9 @@ class QueryBuilder
* *
* <code> * <code>
* $qb = $conn->createQueryBuilder() * $qb = $conn->createQueryBuilder()
* ->update('users', 'u') * ->update('counters', 'c')
* ->set('u.last_login', 'NOW()') * ->set('c.value', 'c.value + 1')
* ->where('u.id = ?'); * ->where('c.id = ?');
* </code> * </code>
* *
* @param string $key The column to set. * @param string $key The column to set.
...@@ -766,19 +766,19 @@ class QueryBuilder ...@@ -766,19 +766,19 @@ class QueryBuilder
* *
* <code> * <code>
* $qb = $conn->createQueryBuilder() * $qb = $conn->createQueryBuilder()
* ->select('u.name') * ->select('c.value')
* ->from('users', 'u') * ->from('counters', 'c')
* ->where('u.id = ?'); * ->where('c.id = ?');
* *
* // You can optionally programatically build and/or expressions * // You can optionally programatically build and/or expressions
* $qb = $conn->createQueryBuilder(); * $qb = $conn->createQueryBuilder();
* *
* $or = $qb->expr()->orx(); * $or = $qb->expr()->orx();
* $or->add($qb->expr()->eq('u.id', 1)); * $or->add($qb->expr()->eq('c.id', 1));
* $or->add($qb->expr()->eq('u.id', 2)); * $or->add($qb->expr()->eq('c.id', 2));
* *
* $qb->update('users', 'u') * $qb->update('counters', 'c')
* ->set('u.last_login', 'NOW()') * ->set('c.value', 'c.value + 1')
* ->where($or); * ->where($or);
* </code> * </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