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