Delete Method

Delete method for deleting data in the table.

$this->db->delete(string $table_name [, int $is_debug=0]): boolean

Parameters

Where method has 2 parameters that is table name and debug flag.

$table_name

Table Name can be string contain table name.

Example usage

Here is the examples using delete method. See the first of this page for full example.

Basic Usage

For example we assumed want to delete data in blog table. First, in the model:

class Blog_Model extends SENE_Model{
	var $tbl = 'd_order';
	var $tbl_as = 'dor';
	public function __construct(){
		parent::__construct();
		$this->db->from($this->tbl,$this->tbl_as);
	}
	public function delete($id){
    $this->db->where("id",$id);
		return $this->db->delete($this->tbl);
	}
}