Updates a field
@param string $field_id
433558
protected function updateField($field_id)
    {
        if (!$this->isError() && !$this->field->update($field_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
471707
protected function updateAddress($address_id)
    {
        if (!$this->isError() && !$this->address->update($address_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
1019200
public function update($table_name, $id, array $data) {
            Event::dispatch(EventData::forBefore(Event::BEFORE_UPDATE, $table_name, $data), $data);


            $q = $this->config->getSystemIdentifierQuote();

            //update database record
            $sql_query = "UPDATE $q" . $table_name . "$q SET ";

            $statement_params = [':update_id' => $id];
            // keep track of null params for logging output. binding null params
            // was causing foreign key violations (for nullable fields)
            $null_params = [];
            foreach ($data as $field_name => $value) {
                if (strtolower($value) == 'null' || is_null($value)) {
                    $sql_query .= "\n$q" . $field_name . "$q = NULL,";
                    $null_params[ $field_name ] = 'NULL';
                } else {
                    $sql_query .= "\n$q" . $field_name . "$q = :" . $field_name . ",";
                    $statement_params[ ':' . $field_name ] = $value;
                }
            }

            $full_param_list = array_merge($null_params, $statement_params);

            $sql_query = substr($sql_query, 0, -1); // remove trailing comma
            $sql_query .= "\nWHERE $q" . 'id' . "$q = :update_id";
            $sql_query .= ";";

            try {
                //Run update query, collect stats
                $stmt = $this->db_connection->prepare($sql_query);
                if ($statement_params) {
                    foreach ($statement_params as $k => $v) {
                        $stmt->bindValue($k, $v);
                    }
                }

                $stmt->execute();
            } catch (Exception $ex) {
                Event::dispatch(EventData::forException($ex, $sql_query, $full_param_list));

                throw new QueryException($ex->getMessage(), $ex->getCode(), $ex);
            }

            $row_count = $stmt->rowCount();
            Event::dispatch(EventData::forAfter(Event::AFTER_UPDATE, $table_name, $full_param_list, $sql_query, $row_count));

            return $row_count;
        }
751734
public function postupdateNotExist($post_id)
    {
        if ($this->countPostUpdates($post_id) == 0)
        {
            DB::table('posts')
                ->where('id', '=', $post_id)
                ->update(['postupdate' => 0])
            ;
        }
    }
233908
public function get($field_key)
	{
		if ( isset($this->fields[$field_key]) ) {
			return $this->fields[$field_key];
		}

		return null;
	}
996620
protected function setFieldFieldValue($field_id)
    {
        $this->data_field = $this->field->get($field_id);

        if (empty($this->data_field)) {
            $this->outputHttpStatus(404);
        }
    }
1207799
public function editFieldValue($field_id, $field_value_id = null)
    {
        $this->setFieldFieldValue($field_id);
        $this->setFieldValue($field_value_id);
        $this->setTitleEditFieldValue();
        $this->setBreadcrumbEditFieldValue();

        $this->setData('field', $this->data_field);
        $this->setData('field_value', $this->data_field_value);
        $this->setData('widget_types', $this->field->getWidgetTypes());
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditFieldValue();
        $this->setDataImagesEditFieldValue();

        $this->outputEditFieldValue();
    }
144369
private static function updateFieldStrVal(&$field, $values, $key)
    {
        if (isset($values[$key]) && is_string($values[$key])) {
            $field->{$key} = $values[$key];
        }
    }
374529
public function update(array $data, $field, $id)
    {
        $this->applyCriteria();

        /** @var Model $model */
        $model = $this->model->where($field, $id)->first();

        $model->fill($data)->save();

        return $model;
    }
413748
public function update($id, $fields)
    {
        $fields = $this->makeJsonReady($fields);
        return $this->put('users/users/'.rawurlencode($id), $fields);
    }
630599
def update_fields(fields)
      attributes[:id]        = fields['id'] || attributes[:id]
      attributes[:idPlugin]  = fields['idPlugin'] || attributes[:idPlugin]
      attributes[:scope]     = fields['scope'] || attributes[:scope]
      attributes[:value]     = JSON.parse(fields['value']).presence if fields.has_key?('value')
      attributes[:idModel]   = fields['idModel'] || attributes[:idModel]
      attributes[:access]    = fields['access'] || attributes[:access]
      self
    end
215485
public function update( $field, $value ) {
		if ( isset($this->ID) ) {
			update_post_meta($this->ID, $field, $value);
			$this->$field = $value;
		}
	}
377003
protected function _updateObject( $comment_id, $fields ) {
		$fields['comment_ID'] = $comment_id;
		$updated = (bool) wp_update_comment( $this->_addSlashesDeep( $fields ) );
		if ( $updated ) {
			$this->_debug( 'Updated comment ' . $comment_id );
		} else {
			$this->_debug( 'Update failed for comment ' . $comment_id );
		}

		return $updated;
	}
1295672
public function updateCMSFields(FieldList $fields)
    {
        $owner = $this->owner;
        $fields->addFieldToTab(
            'Root.Main',
            TextField::create(
                'IDCustomValue',
                _t(__CLASS__ . '.ID', 'ID')
            )
            ->setDescription(_t(__CLASS__ . '.IDCUSTOMVALUE', 'Define an ID for the link.  This is particularly useful for google tracking.'))
        );
        return $fields;
    }
226032
public function updateCMSFields(FieldList $fields)
    {
        $tags = $this->getAllTagsMap();
        $tagField = ListboxField::create('Tags', _t('DMSDocumentTaxonomyExtension.TAGS', 'Tags'))
            ->setMultiple(true)
            ->setSource($tags);

        if (empty($tags)) {
            $tagField->setAttribute('data-placeholder', _t('DMSDocumentTaxonomyExtension.NOTAGS', 'No tags found'));
        }

        $fields->insertAfter('Description', $tagField);
    }
159826
protected function updateZone($zone_id)
    {
        if (!$this->isError() && !$this->zone->update($zone_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
1348515
def update_fields(fields)
      attributes[:id] = fields['id'] || attributes[:id]
      attributes[:name] = fields['name'] || fields[:name] || attributes[:name]
      attributes[:description] = fields['desc'] || attributes[:description]
      attributes[:closed] = fields['closed'] if fields.has_key?('closed')
      attributes[:url] = fields['url'] || attributes[:url]
      attributes[:check_items] = fields['checkItems'] if fields.has_key?('checkItems')
      attributes[:position] = fields['pos'] || attributes[:position]
      attributes[:board_id] = fields['idBoard'] || attributes[:board_id]
      attributes[:card_id] = fields['idCard'] || fields[:card_id] || attributes[:card_id]
      attributes[:list_id] = fields['idList'] || attributes[:list_id]
      attributes[:member_ids] = fields['idMembers'] || attributes[:member_ids]
      self
    end