function truncate($table = '')
{
if ($table == '') {
if (!isset($this->ar_from[0])) {
if ($this->db_debug) {
return $this->display_error('db_must_set_table');
}
return FALSE;
}
$table = $this->ar_from[0];
} else {
$table = $this->_protect_identifiers($table, TRUE, NULL, FALSE);
}
$sql = $this->_truncate($table);
$this->_reset_write();
return $this->query($sql);
}