我正在使用此代码备份数据,如何截断数据库中的所有表?
我的备份数据库功能
public function export_db() {
$this->load->dbutil();
$prefs = array(
'format' => 'zip',
'filename' => date("Y-m-d-H-i-s").'.sql'
);
$backup = & $this->dbutil->backup($prefs);
$db_name = 'db-' . date("Y-m-d-H-i-s") . '.zip';
$save = 'assets/database_backup/' . $db_name;
$this->load->helper('file');
write_file($backup);
$this->load->helper('download');
force_download($db_name, $backup);
}
如何在上述函数中添加截断代码?