diff options
author | Indieteq <admin@indieteq.com> | 2012-11-10 20:20:53 +0100 |
---|---|---|
committer | Indieteq <admin@indieteq.com> | 2012-11-10 20:20:53 +0100 |
commit | af106b1cfb68d698c7b77f5c18cb60b84762969c (patch) | |
tree | 6c18214ab97d62794795b7ccafc8ff516d77cdee | |
parent | 56e9be13da22a65ebb777820648ce30e26c056ce (diff) | |
download | php-mysql-pdo-database-class-af106b1cfb68d698c7b77f5c18cb60b84762969c.zip php-mysql-pdo-database-class-af106b1cfb68d698c7b77f5c18cb60b84762969c.tar.gz php-mysql-pdo-database-class-af106b1cfb68d698c7b77f5c18cb60b84762969c.tar.bz2 |
Update easyCRUD/index.php
-rw-r--r-- | easyCRUD/index.php | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/easyCRUD/index.php b/easyCRUD/index.php index 23c4e8b..65891df 100644 --- a/easyCRUD/index.php +++ b/easyCRUD/index.php @@ -1,39 +1,32 @@ <?php - require("Person.class.php"); - //$person = new Person(array("Firstname"=>"kona","Age"=>"20","Sex"=>"F")); - //$person = new Person(array("id"=>"67")); +// Our person object + $person = new Person(); // Create new person -// $person->Firstname = "Kona"; -// $person->Age = "20"; -// $person->Sex = "F"; -// $creation = $person->Create(); + $person->Firstname = "Kona"; + $person->Age = "20"; + $person->Sex = "F"; + $creation = $person->Create(); - //var_dump($creation); // Update Person Info -// $person->id = "4"; -// $person->Age = "32"; -// $saved = $person->Save(); - -// var_dump($saved); + $person->id = "4"; + $person->Age = "32"; + $saved = $person->Save(); // Find person - //$person->id = "4"; - //$person->Find(); + $person->id = "4"; + $person->Find(); -// echo $person->Firstname; -// echo $person->Age; + echo $person->Firstname; + echo $person->Age; // Delete person -// $person->id = "17"; + $person->id = "17"; $delete = $person->Delete(); - var_dump($delete); // Get all persons $persons = $person->all(); - - ?>
\ No newline at end of file |