Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samayo authored Feb 7, 2017
1 parent 06c8890 commit 23a4282
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,23 @@ $db = new Db(

Examples
-----
```php
##### SELECT

#### SELECT
returns result in `$select` as array format
```php
$select = $db->select('SELECT * FROM users WHERE id = ?', [145]);
```

##### INSERT
#### INSERT
returns `$insert` with the value of `lastInsertId()` on success
```php
$insert = $db->insert('INSERT INTO users (lastname) VALUES (?)', ['robin']);
```

##### DELETE
#### DELETE
returns `$delete` with boolean value on success
```php
$delete = $db->delete('DELETE FROM users WHERE id = ?', [456]);
```

#### UPDATE
returns `$update` with boolean value on success
```php
$update = $db->update('UPDATE cars SET color = ? WHERE model = ?', ['blue', 'Toyota']);
Expand Down

0 comments on commit 23a4282

Please sign in to comment.