|
|
|
@ -24,15 +24,10 @@ class People {
|
|
|
|
return $people;
|
|
|
|
return $people;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static function create($person){
|
|
|
|
static function create($person){
|
|
|
|
$people = array();
|
|
|
|
$query = file_get_contents(__DIR__ . '/../database/sql/create.sql');
|
|
|
|
$people[] = new Person('joni', 52);
|
|
|
|
$result = pg_query_params($query, array($person->name, $person->age));
|
|
|
|
$people[] = new Person('bob', 34);
|
|
|
|
|
|
|
|
$people[] = new Person('sally', 21);
|
|
|
|
|
|
|
|
$people[] = new Person('matt', 37);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$people[] = $person;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $people;
|
|
|
|
return self::find();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static function delete($index){
|
|
|
|
static function delete($index){
|
|
|
|
$people = array();
|
|
|
|
$people = array();
|
|
|
|
|