summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorIndieteq <admin@indieteq.com>2012-11-14 23:34:29 +0100
committerIndieteq <admin@indieteq.com>2012-11-14 23:34:29 +0100
commitba3a78509f0291326baead80b82eb210e8b03d72 (patch)
tree92e49c8c91c8bc951a9c114a0e3a6feac69e3fa3 /README.md
parent2fedec82f555bbfc9b020f88de821675f103131e (diff)
downloadphp-mysql-pdo-database-class-ba3a78509f0291326baead80b82eb210e8b03d72.zip
php-mysql-pdo-database-class-ba3a78509f0291326baead80b82eb210e8b03d72.tar.gz
php-mysql-pdo-database-class-ba3a78509f0291326baead80b82eb210e8b03d72.tar.bz2
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/README.md b/README.md
index 8b22422..d79c563 100644
--- a/README.md
+++ b/README.md
@@ -132,7 +132,7 @@ if($insert > 0 ) {
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.
+The default fetch style is <i>PDO::FETCH_ASSOC</i> which returns an associative array.
Here an example :
@@ -216,6 +216,7 @@ $person->Firstname = "Nhoj";
$person->Age = "20";
$person->Sex = "F";
$person->Id = "4";
+// Returns affected rows
$saved = $person->Save();
// Or give the bindings to the constructor
@@ -230,13 +231,16 @@ $saved = $person->Save();
<?php
// Find person
$person->Id = "1";
-$person = $person->Find();
+$person->Find();
+
+echo $person->firstname;
+// Johny
// Shorthand method, give id as parameter
-$person = $person->Find(1);
+$person->Find(1);
// SQL Equivalent
-"SELECT * FROM persons WHERE Id= 1"
+"SELECT * FROM persons WHERE Id = 1"
```
#### Getting all the persons
```php