CI_DB_query_builder::_validate_update PHP Method

_validate_update() protected method

This method is used by both update() and get_compiled_update() to validate that data is actually being set and that a table has been chosen to be update.
protected _validate_update ( $table ) : boolean
return boolean
    protected function _validate_update($table)
    {
        if (count($this->qb_set) === 0) {
            return $this->db_debug ? $this->display_error('db_must_use_set') : FALSE;
        }
        if ($table !== '') {
            $this->qb_from = array($this->protect_identifiers($table, TRUE, NULL, FALSE));
        } elseif (!isset($this->qb_from[0])) {
            return $this->db_debug ? $this->display_error('db_must_set_table') : FALSE;
        }
        return TRUE;
    }