summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIndieteq <admin@indieteq.com>2012-11-14 23:15:10 +0100
committerIndieteq <admin@indieteq.com>2012-11-14 23:15:10 +0100
commit33260959a1a666a636c0825a7bfba54cd174fc99 (patch)
tree22b10c6f3b818748b0821963d30fdfbaacf454d4
parentfe32ffbdb28de5178857994bd4b430e06af95f84 (diff)
downloadphp-mysql-pdo-database-class-33260959a1a666a636c0825a7bfba54cd174fc99.zip
php-mysql-pdo-database-class-33260959a1a666a636c0825a7bfba54cd174fc99.tar.gz
php-mysql-pdo-database-class-33260959a1a666a636c0825a7bfba54cd174fc99.tar.bz2
Update README.md
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 38242b5..715dc0a 100644
--- a/README.md
+++ b/README.md
@@ -125,6 +125,22 @@ if($insert > 0 ) {
}
```
+## Method parameters
+Every method which executes a query has the optional parameter called bindings.
+
+The <i>row</i> and the <i>query</i> method have a third optional parameter which is the fetch style.
+The default fetch style is PDO::FETCH_ASSOC which returns an associative array.
+
+Here an example :
+
+```php
+<?php
+ // Fetch style as third parameter
+ $persons_num = $db->query("SELECT * FROM Persons", null, PDO::FETCH_NUM);
+```
+More info about the PDO fetchstyle : http://php.net/manual/en/pdostatement.fetch.php
+
+
EasyCRUD
============================
The easyCRUD is a class which you can use to easily execute basic SQL operations like(insert, update, select, delete) on your database.