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

Commit

Permalink
Update selects.md
Browse files Browse the repository at this point in the history
  • Loading branch information
odan authored May 14, 2018
1 parent 986fdff commit 21ddf0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/selects.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ SELECT count(*) AS user_count, `status` FROM `payments` WHERE `status` <> 1 GROU
Using whereRaw:

```php
$users = $db->select()
$query = $db->select()
->columns('id', 'username')
->from('users')
->whereRaw('status <> 1')
->execute()
->fetchAll();
->whereRaw('status <> 1');

$users = $query->execute()->fetchAll();
```

```sql
SELECT `id`, username WHERE status <> 1 FROM `users`;
SELECT `id`, `username` WHERE status <> 1 FROM `users`;
```

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

```sql
SELECT SUM(`amount`) AS `sum_amount` FROM `payments`;
```
```

0 comments on commit 21ddf0a

Please sign in to comment.