Skip to main content

Model::addBindParam

Add Bind Parameter types

Description

public self Model::addBindParam( string $column, string $type )

Arguments

NameData typeDefaultRemarks
$columnstringBind Column
$typestringBind Type

Prepared Type

  • FLOAT
  • INTEGER
  • DATE
  • DATETIME

Example

Controller
$model = new Model();
$model->addBindParam('news_id', 'INTEGER');
$model->addBindParam('image_id', 'INTEGER');
$model->addBindParam('file_id', 'INTEGER');
$model->addBindParam('post_date', 'DATETIME');

// Same with the following
$model = new Model();
$model->setBindParam(array(
'news_id' => 'INTEGER',
'image_id' => 'INTEGER',
'file_id' => 'INTEGER',
'post_date' => 'DATETIME',
));