Skip to content
This repository was archived by the owner on Nov 26, 2022. It is now read-only.

Commit 21ddf0a

Browse files
authored
Update selects.md
1 parent 986fdff commit 21ddf0a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/selects.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ SELECT count(*) AS user_count, `status` FROM `payments` WHERE `status` <> 1 GROU
133133
Using whereRaw:
134134

135135
```php
136-
$users = $db->select()
136+
$query = $db->select()
137137
->columns('id', 'username')
138138
->from('users')
139-
->whereRaw('status <> 1')
140-
->execute()
141-
->fetchAll();
139+
->whereRaw('status <> 1');
140+
141+
$users = $query->execute()->fetchAll();
142142
```
143143

144144
```sql
145-
SELECT `id`, username WHERE status <> 1 FROM `users`;
145+
SELECT `id`, `username` WHERE status <> 1 FROM `users`;
146146
```
147147

148148
Creating raw expressions with the function builder:
@@ -651,4 +651,4 @@ $query->columns($query->func()->sum('amount')->alias('sum_amount'));
651651

652652
```sql
653653
SELECT SUM(`amount`) AS `sum_amount` FROM `payments`;
654-
```
654+
```

0 commit comments

Comments
 (0)