Introduction
Extended Database Library for LH project
How to use
Model
is already imported on Controller
, so you can call without include.
Controller
$model = new Model(false, array(
'table' => 'cms_news',
'id' => 'news_id',
'visible' => 'visible',
));
$records = $model->find();
Methods
- Model::__construct Important
- Model class constructor
- Model::setTableName
- Set Table Name
- Model::getTableName
- Get Table name
- Model::setPrimary
- Set Primary ID name
- Model::getPrimary
- Get Primary ID name
- Model::setVisible
- Set Visible flag name
- Model::getVisible
- Get Visible flag name
- Model::setBindParam
- Set Bind Parameter types
- Model::addBindParam
- Add Bind Parameter types
- Model::getBindParam
- Get Bind Parameter types
- Model::select Important
- Set Select Parameter
- Model::listMax Important
- Set ListMax Parameter
- Model::current Important
- Set Current Page Parameter
- Model::where Important
- Set Where Parameter
- Model::whereOpen Important
- Add open bracket on Where query
- Model::whereClose Important
- Add close bracket on Where query
- Model::having
- Set Having Parameter
- Model::havingOpen
- Add open bracket on Having query
- Model::havingClose
- Add close bracket on Having query
- Model::order Important
- Set Order Parameter
- Model::join
- Set Join Parameter
- Model::group
- Set Group Parameter
- Model::find Important
- Get rows designated count
- Model::getPager Important
- Get variables for making pager
- Model::one Important
- Get one row from the records
- Model::count Important
- Get the number of record's count
- Model::id Important
- Get one record by specified primary ID
- Model::setOptions
- Setting option parameter
- Model::resetOptions
- Reset Options Data
- Model::insert Important
- Execute Insert data
- Model::updateWhere Important
- Execute Update the records by specified condition
- Model::update Important
- Execute Update the record by specified primary ID
- Model::deleteWhere Important
- Execute Logical Delete the records by specified condition
- Model::delete Important
- Execute Logical Delete the record by specified primary ID
- Model::eraseWhere
- Execute Physical Delete the records by specified condition
- Model::erase
- Execute Physical Delete the record by specified primary ID
- Model::create
- Execute Create Table
- Model::dropTable
- Execute Drop table
- Model::dropIndex
- Execute Drop index
- Model::alterAddColumn
- Execute Alter Add Column
- Model::alterRenameTo
- Execute Alter Rename
- Model::pragma
- Execute Pragma
- Model::reset
- Reset Model
- Model::debug
- Get last executed query
- Model::unsetRegularUseQuery
- Disable automatic append query for a current query flag
- Model::unsetRegularUseQueryForTable
- Disable automatic append query of the table for a current query flag
- Model::disabledRegularUseQuery
- Disable automatic append query flag