Skip to content
Taufik Firmansyah edited this page Jan 30, 2015 · 3 revisions

Every generated modules has they own model .

Model Structure

<?php
class Employee extends BaseModel  {
	
	protected $table = 'yourtable';
	protected $primaryKey = 'primarykey';

	public function __construct() {
		parent::__construct();
		
	}

	public static function querySelect(  ){
		
		
		return "  SELECT yourtable.* FROM yourtable";
	}
	public static function queryWhere(  ){
		
		return " WHERE yourtable.primarykeyIS NOT NULL   ";
	}
	
	public static function queryGroup(){
		return "  ";
	}
	

}

As you can see , they only have 3 function inside model . This is inheriet class , so all parent class are will automate available in this model class .

Please reffer to BaseModel class list .

Module Structure

BaseController

BaseModel

SiteHelpers

Clone this wiki locally