CI_DB_query_builder::empty_table PHP Method

empty_table() public method

Compiles a delete string and runs "DELETE FROM table"
public empty_table ( $table = '' ) : boolean
return boolean TRUE on success, FALSE on failure
    public function empty_table($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->_delete($table);
        $this->_reset_write();
        return $this->query($sql);
    }