public function selectById($thepage, $id) { switch ($thepage) { case 'test': $test = new test(); $result = $test->select($_GET['id']); break; default: //$this->common_add($_POST,$thepage); break; } if ($result) { return $result; } else { return NULL; } }
<?php // SAMPLE FOR METHOD DELETE() include_once "../generated_classes/class.test.php"; $test = new test(); $test->select(16); $test->delete(16); print "deleted record {$test->id}";
<?php // SAMPLE FOR METHOD SELECT() include_once "../generated_classes/class.test.php"; $test = new test(); $test->select(12); $v = $test->getvorname(); print "{$v}"; $test->setvorname("alpha"); $v = $test->getvorname(); print "{$v}"; print "selected record {$test->id}";