Choose a file to view:
class_News.php
class_User.php
dbBase.php
index.php
or go back to the demo
<?php include_once "dbBase.php"; ////Generic class template //// Notes: //// xx = Class Name //// xxx = table name //// $.. = column name(s) class News extends dbBase { public $title = ""; public $slug = ""; public $text = ""; function __construct($id = "") { $this->table = "news"; if(strlen($id)>0) { Load($id); } } function Add($postData) { $ignore = array('id','add_post'); $id = parent::Add($postData,$ignore); return $id; } function Update($postData) { $ignore = array('id','update_post'); $id = parent::Update($postData,$ignore); } ////////////////////////////////////////////////// // Class Specific Functions ////////////////////////////////////////////////// } ?>