tutsdot.blogspot.com - If you want to empty or truncate a mysql table using Codeigniter active record, use the following code.
To empty
$this->db->empty_table();This will generate a delete SQL string and runs the query.
// DELETE FROM mytableTo truncate
$this->db->from('mytable'); $this->db->truncate(); // or $this->db->truncate('mytable');This will generate a truncate SQL string and runs the query.
// TRUNCATE mytableSource: http://www.learnhow2do.com/computer/internet/2013/04/13/learn-how-to-empty-or-truncate-table-using-codeigniter-active-record/
other source : http://merdeka.com, http://stackoverflow.com, http://developer-paradize.blogspot.com
0 Response to "How to empty or truncate mysql table using codeigniter active record? - mysql"
Post a Comment