summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIndieteq <admin@indieteq.com>2012-11-12 14:21:44 +0100
committerIndieteq <admin@indieteq.com>2012-11-12 14:21:44 +0100
commitfb97eae3e72a0f436137861ee2a1e6b85fe677ca (patch)
treef4a919934e1835fdeb0abf69a201cd07a0f06fcd
parent6b98954b8040ec4cae63a2be9d79ac9bc18cd903 (diff)
downloadphp-mysql-pdo-database-class-fb97eae3e72a0f436137861ee2a1e6b85fe677ca.zip
php-mysql-pdo-database-class-fb97eae3e72a0f436137861ee2a1e6b85fe677ca.tar.gz
php-mysql-pdo-database-class-fb97eae3e72a0f436137861ee2a1e6b85fe677ca.tar.bz2
Update easyCRUD/index.php
-rw-r--r--easyCRUD/index.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/easyCRUD/index.php b/easyCRUD/index.php
index 65891df..e77c04e 100644
--- a/easyCRUD/index.php
+++ b/easyCRUD/index.php
@@ -1,32 +1,32 @@
-<?php
- require("Person.class.php");
+<?php
+// Require the person class file
+ require("Person.class.php");
-// Our person object
- $person = new Person();
+// Instantiate the person class
+ $person = new Person();
-// Create new person
- $person->Firstname = "Kona";
- $person->Age = "20";
- $person->Sex = "F";
- $creation = $person->Create();
+// Create new person
+ $person->Firstname = "Kona";
+ $person->Age = "20";
+ $person->Sex = "F";
+ $creation = $person->Create();
+// Update Person Info
+ $person->id = "4";
+ $person->Age = "32";
+ $saved = $person->Save();
-// Update Person Info
- $person->id = "4";
- $person->Age = "32";
- $saved = $person->Save();
+// Find person
+ $person->id = "4";
+ $person->Find();
-// Find person
- $person->id = "4";
- $person->Find();
-
- echo $person->Firstname;
- echo $person->Age;
+ echo $person->Firstname;
+ echo $person->Age;
// Delete person
- $person->id = "17";
- $delete = $person->Delete();
+ $person->id = "17";
+ $delete = $person->Delete();
// Get all persons
- $persons = $person->all();
+ $persons = $person->all();
?> \ No newline at end of file