From aa25877a75ae2a3a17368d5a4bd5a500db894650 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Fri, 27 Jul 2018 12:01:41 -0700 Subject: [PATCH] Removed NOW() from QueryBuilder usage examples --- lib/Doctrine/DBAL/Query/QueryBuilder.php | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 8a69806b3a9..40c133abe20 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -552,9 +552,9 @@ public function delete($delete = null, $alias = null) * * * $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 = ?'); * * * @param string $update The table whose rows are subject to the update. @@ -745,9 +745,9 @@ public function rightJoin($fromAlias, $join, $alias, $condition = null) * * * $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 = ?'); * * * @param string $key The column to set. @@ -766,19 +766,19 @@ public function set($key, $value) * * * $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); * *