How To Empty Or Truncate Mysql Tabular Array Using Codeigniter Active Record?

If you lot desire to empty or truncate a mysql tabular array using Codeigniter active record, role the next code.
To empty
 $this->db->empty_table(); 
This volition generate a delete SQL string too runs the query.
 // DELETE FROM mytable 
To truncate
 $this->db->from('mytable');  $this->db->truncate();  // or  $this->db->truncate('mytable'); 
This volition generate a truncate SQL string too runs the query.
 // TRUNCATE mytable  
Source: http://www.learnhow2do.com/computer/internet/2013/04/13/learn-how-to-empty-or-truncate-table-using-codeigniter-active-record/
Sumber http://developer-paradize.blogspot.com

Comments

Popular posts from this blog

What Are The Main Components of a Computer System

Top Qualities To Look For In An IT Support Team

How To Integrate Google Adwords Api Into Codeigniter?