Update AS Method

Update AS method is like update method but with unescaped key value pair. This method suitable for update column to column in a table.

This methode is available from SEME Framework version 3.1.4.


Maybe using escape methode ($this->db->esc('NILAI')) for key value pair is required for prevent SQL injection.


Update method has 2 required parameters that is table name and key value pair in array, another parameters are optional. Here is the completed parameters can be used by where methods

$this->db->update_as(string $table_name, array $data_update, [bool $is_debug=0]): bool


Fill with table name that will be updated.


Contains name and value pair in array. The key is for column name and the value is for new updated value.


Flag for activating debug mode.

Example usage

Here is the examples usage for this method:

class Blog_Model extends SENE_Model{
  var $tbl = 'blog';
  var $tbl_as = 'b';
  public function __construct(){
  public function update(){
    $du = array();
    $du['counter'] = '`counter`+1';