diff options
author | Indieteq <admin@indieteq.com> | 2012-11-14 23:15:10 +0100 |
---|---|---|
committer | Indieteq <admin@indieteq.com> | 2012-11-14 23:15:10 +0100 |
commit | 33260959a1a666a636c0825a7bfba54cd174fc99 (patch) | |
tree | 22b10c6f3b818748b0821963d30fdfbaacf454d4 | |
parent | fe32ffbdb28de5178857994bd4b430e06af95f84 (diff) | |
download | php-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.md | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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. |