CI_DB_query_builder::_validate_insert PHP Method

_validate_insert() protected method

This method is used by both insert() and get_compiled_insert() to validate that the there data is actually being set and that table has been chosen to be inserted into.
protected _validate_insert ( $table = '' ) : string
return string
    protected function _validate_insert($table = '')
    {
        if (count($this->qb_set) === 0) {
            return $this->db_debug ? $this->display_error('db_must_use_set') : FALSE;
        }
        if ($table !== '') {
            $this->qb_from[0] = $table;
        } elseif (!isset($this->qb_from[0])) {
            return $this->db_debug ? $this->display_error('db_must_set_table') : FALSE;
        }
        return TRUE;
    }