summaryrefslogtreecommitdiffstats
path: root/easyCRUD/index.php
diff options
context:
space:
mode:
authorJamie Cressey <jamiecressey89@googlemail.com>2014-07-05 16:14:09 -0400
committerJamie Cressey <jamiecressey89@googlemail.com>2014-07-05 16:14:09 -0400
commit9737cfe130e4a7a56eaa91ba0835efdedb9bceec (patch)
tree6ae1902ef09943295ecb3930fab2c7e10b3ba9ac /easyCRUD/index.php
parent66e72318fbac670abe640d62eaf0c87ef9498fb3 (diff)
downloadphp-mysql-pdo-database-class-9737cfe130e4a7a56eaa91ba0835efdedb9bceec.zip
php-mysql-pdo-database-class-9737cfe130e4a7a56eaa91ba0835efdedb9bceec.tar.gz
php-mysql-pdo-database-class-9737cfe130e4a7a56eaa91ba0835efdedb9bceec.tar.bz2
Clean up for my needs
Diffstat (limited to 'easyCRUD/index.php')
-rw-r--r--easyCRUD/index.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/easyCRUD/index.php b/easyCRUD/index.php
deleted file mode 100644
index b48efa3..0000000
--- a/easyCRUD/index.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// Require the person class file
- require("Person.class.php");
-
-// Instantiate the person class
- $person = new Person();
-
-// 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();
-
-// Find person
- $person->id = "4";
- $person->Find();
-
- d($person->Firstname, "Person->Firstname");
- d($person->Age, "Person->Age");
-
-// Delete person
- $person->id = "17";
- $delete = $person->Delete();
-
- // Get all persons
- $persons = $person->all();
-
- // Aggregates methods
- d($person->max('age'), "Max person age");
- d($person->min('age'), "Min person age");
- d($person->sum('age'), "Sum persons age");
- d($person->avg('age'), "Average persons age");
- d($person->count('id'), "Count persons");
-
- function d($v,$t)
- {
- echo '<pre>';
- echo '<h1>' . $t. '</h1>';
- var_dump($v);
- echo '</pre>';
- }
-
-?>