Skip to content

Commit 0318e2e

Browse files
authored
Merge pull request #2180 from jim-parry/fix-qbdocs
Fix query builder user guide page
2 parents f9b4f48 + 7e8165b commit 0318e2e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

user_guide_src/source/database/query_builder.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ selectMax(), You can optionally include a second parameter to rename
184184
the resulting field.
185185

186186
.. note:: This method is particularly helpful when used with ``groupBy()``. For
187-
counting results generally see ``countAll()`` or ``countAllResults()``.
187+
counting results generally see ``countAll()`` or ``countAllResults()``.
188188

189189
::
190190

@@ -297,7 +297,8 @@ methods:
297297

298298
#. **Subqueries:**
299299
You can use an anonymous function to create a subquery.
300-
::
300+
301+
::
301302

302303
$builder->where('advance_amount <', function(BaseBuilder $builder) {
303304
return $builder->select('MAX(advance_amount)', false)->from('orders')->where('id >', 2);
@@ -307,7 +308,9 @@ methods:
307308
**$builder->orWhere()**
308309

309310
This function is identical to the one above, except that multiple
310-
instances are joined by OR::
311+
instances are joined by OR
312+
313+
::
311314

312315
$builder->where('name !=', $name);
313316
$builder->orWhere('id >', $id); // Produces: WHERE name != 'Joe' OR id > 50
@@ -330,7 +333,6 @@ You can use subqueries instead of an array of values.
330333
$builder->whereIn('id', function(BaseBuilder $builder) {
331334
return $builder->select('job_id')->from('users_jobs')->where('user_id', 3);
332335
});
333-
334336
// Produces: WHERE "id" IN (SELECT "job_id" FROM "users_jobs" WHERE "user_id" = 3)
335337

336338
**$builder->orWhereIn()**

0 commit comments

Comments
 (0)