Question and answer is powered by AnsPress.io
Need TRUNCATE MySQL table, I am using PHP Codeigniter framework. In my Codeigniter controller, I have applied a query for TRUNCATE some tables from the database. But my code not working, I have tried with this code.
$query = $this->db->query('TRUNCATE `customer` ;TRUNCATE `vendor` ;');
Need help.
Apply this code to your controller.
$this->db->truncate('customer'); $this->db->truncate('vendor');
Hope it will be helpful for you.