Delete Method

The delete method is a part of the query builder which is useful for deleting data in a table by execute DELETE SQL command.

Basic Usage

Here is the basic usage delete method from $db property on SENE_Model class.

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


This method has 1 required parameter and 1 optional parameter.


The name of table that will be deleted.


The $is_debug parameter is a marker (flag) to enable debug mode. The value of this parameter can be filled with int 1 to enable debug mode and display the query to be processed. Fill it with another value to not enable debug mode. In debug mode, there will be no query execution process to the database system.

Example Usage

Here is the examples using delete method on blog_model.php file

class Blog_Model extends SENE_Model{
  var $tbl = 'd_order';
  var $tbl_as = 'dor';
  public function __construct(){
  public function delete($id){
    return $this->db->delete($this->tbl);