Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
2d3c0f15
Unverified
Commit
2d3c0f15
authored
Jul 28, 2018
by
Marco Pivetta
Committed by
GitHub
Jul 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3232 from morozov/remove-now
Removed NOW() from QueryBuilder usage examples
parents
54054275
aa25877a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
QueryBuilder.php
lib/Doctrine/DBAL/Query/QueryBuilder.php
+13
-13
No files found.
lib/Doctrine/DBAL/Query/QueryBuilder.php
View file @
2d3c0f15
...
@@ -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.nam
e')
* ->select('
c.valu
e')
* ->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>
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment