Skip to content

Commit 3326095

Browse files
author
Indieteq
committed
Update README.md
1 parent fe32ffb commit 3326095

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@ if($insert > 0 ) {
125125
}
126126

127127
```
128+
## Method parameters
129+
Every method which executes a query has the optional parameter called bindings.
130+
131+
The <i>row</i> and the <i>query</i> method have a third optional parameter which is the fetch style.
132+
The default fetch style is PDO::FETCH_ASSOC which returns an associative array.
133+
134+
Here an example :
135+
136+
```php
137+
<?php
138+
// Fetch style as third parameter
139+
$persons_num = $db->query("SELECT * FROM Persons", null, PDO::FETCH_NUM);
140+
```
141+
More info about the PDO fetchstyle : http://php.net/manual/en/pdostatement.fetch.php
142+
143+
128144
EasyCRUD
129145
============================
130146
The easyCRUD is a class which you can use to easily execute basic SQL operations like(insert, update, select, delete) on your database.

0 commit comments

Comments
 (0)