From ba3a78509f0291326baead80b82eb210e8b03d72 Mon Sep 17 00:00:00 2001 From: Indieteq Date: Wed, 14 Nov 2012 23:34:29 +0100 Subject: Update README.md --- README.md | 12 ++++++++---- 1 file 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 row and the query 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 PDO::FETCH_ASSOC 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(); 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 -- cgit v1.1