Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //-------------------------------------------------
- // question model
- //-------------------------------------------------
- class Question extends Model {
- protected $_table = 'questions';
- protected $_idfield = 'qid';
- protected $fields = array (
- array('fn'=>'qtitle', 'ft'=>'s'),
- array('fn'=>'qtext','ft'=>'s'),
- array('fn'=>'qcategory','ft'=>'i', 'lookup'=>'category'),
- array('fn'=>'quser','ft'=>'i', 'lookup'=>'user'),
- array('fn'=>'qdate','ft'=>'s'));
- protected $_postvars = array ('qtitle'=>'', 'qtext'=>'', 'qcategory'=>'', 'quser'=>'');
- //-----------------------------------------
- protected function setAutoVars() {
- $this->a__qdate = date('Y-m-d H:i:s');
- }
- //-----------------------------------------
- public function getCategory($category) {
- return 'not implemented yet';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement