protected function clearData($table, $clearLinks = false)
    {
        if ($this->option('clear')) {
            $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');

            $this->db->table($table)->truncate();

            if ($clearLinks) {
                $this->db->table('table_links')->where('new_table', $table)->delete();
            }

            $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
        }
    }
protected function clearData($table, $clearLinks = false)
    {
        if ($this->option('clear')) {
            $this->db->statement('SET FOREIGN_KEY_CHECKS=0;');

            $this->db->table($table)->truncate();

            if ($clearLinks) {
                $this->db->table('table_links')->where('new_table', $table)->delete();
            }

            $this->db->statement('SET FOREIGN_KEY_CHECKS=1;');
        }
    }
protected function clearData ( $ table , $ clearLinks = false ) { if ( $ this -> option ( 'clear' ) ) { $ this -> db -> statement ( 'SET FOREIGN_KEY_CHECKS=0;' ) ; $ this -> db -> table ( $ table ) -> truncate ( ) ; if ( $ clearLinks ) { $ this -> db -> table ( 'table_links' ) -> where ( 'new_table' , $ table ) -> delete ( ) ; } $ this -> db -> statement ( 'SET FOREIGN_KEY_CHECKS=1;' ) ; } }
If set, truncate the database table.

@param string  $table
@param boolean $clearLinks
If set truncate the database table .