update()
Update details in database after ::find(2)

@return bool
423587
public function update($id, $dbConnection = NULL)
    {
        $connection = DatabaseQuery::checkConnection($dbConnection);

        $updateQuery = $this->updateQuery(self::getTableName($connection), $id);
        $statement = $connection->prepare($updateQuery);
        if ($statement->execute()) {
            return true;
        }
        throw new  DataAlreadyExistException();
    }
813124
public function hasOnUpdate()
    {
        $database = $this->getTable()->getDatabase();
        if($database instanceof Database &&
               $this->onUpdate === $database->getPlatform()->getDefaultFKOnUpdateBehavior()) {
          return false;
        }

        return ($this->onUpdate !== self::NONE);
    }
804628
public function update() {
        global $DB;

        if (empty($this->id)) {
            debugging('Can not update data object, no id!');
            return false;
        }

        $data = $this->get_record_data();

        $DB->update_record($this->table, $data);

        $this->notify_changed(false);
        return true;
    }
721420
public function update($db=''){
		if ( empty($db) ){
			$db = $this->db->current;
		}
		if ( bbn\str::check_name($db) ){

      $this->db->clear_all_cache();

			$change = $this->db->current === $db ? false : $this->db->current;
			if ( $change ){
				$this->db->change($db);
			}
			$schema = $this->db->modelize();
			if ( $change ){
				$this->db->change($change);
			}
      /*
			$projects = [];
			$r1 = $this->db->query("SELECT *
			FROM `{$this->admin_db}`.`{$this->prefix}projects`
			WHERE `db` LIKE '$db'");
			while ( $d1 = $r1->get_row() ){
				$projects[$d1['id']] = $d1;
				$projects[$d1['id']]['forms'] = [];
				$r2 = $this->db->query("
					SELECT id
					FROM `{$this->admin_db}`.`{$this->prefix}forms`
					WHERE `id_project` = ?",
					$d1['id']);
				while ( $d2 = $r2->get_row() ){
					$projects[$d1['id']]['forms'][$d2['id']] = $this->get_form_config();
				}
			}
			*/
			$this->db->insert_ignore($this->admin_db.'.'.$this->prefix.'dbs',[
        'id' => $db,
        'db' => $db,
        'host' => $this->db->host
      ]);
      $tab_history = false;
      if ( bbn\appui\history::$is_used && isset($schema[bbn\appui\history::$htable]) ){
        $tab_history = 1;
      }
      if ( !\is_array($schema) ){

        die(var_dump("THIS IS NOT AN ARRAY", $schema));
      }

			foreach ( $schema as $t => $vars ){
        $col_history = $tab_history;
				if ( isset($vars['fields']) ){
          $tmp = explode(".", $t);
          $db = $tmp[0];
          $table = $tmp[1];
					$this->db->insert_update($this->admin_db.'.'.$this->prefix.'tables',[
						'id' => $t,
						'db' => $db,
						'table' => $table
					]);
          if ( $col_history && !array_key_exists(bbn\appui\history::$hcol, $vars['fields']) ){
            $col_history = false;
          }
          foreach ( $vars['fields'] as $col => $f ){
    				$config = new \stdClass();
						if ( $col_history && ($col !== bbn\appui\history::$hcol) ){
							$config->history = 1;
						}
						if ( !empty($f['extra']) ){
							$config->extra = $f['extra'];
						}
						if ( isset($f['signed']) && $f['signed'] == 1 ){
							$config->signed = 1;
						}
						if ( isset($f['null']) && $f['null'] == '1' ){
							$config->null = 1;
						}
						if ( isset($f['maxlength']) && $f['maxlength'] > 0 ){
							$config->maxlength = (int)$f['maxlength'];
						}
						if ( isset($f['keys']) ){
							$config->keys = [];
							foreach ( $f['keys'] as $key ){
								$config->keys[$key] = $vars['keys'][$key];
							}
						}
						$this->db->insert_update($this->admin_db.'.'.$this->prefix.'columns',[
							'id' => $t.'.'.$col,
							'table' => $t,
							'column' => $col,
							'position' => $f['position'],
							'type' => $f['type'],
							'null' => $f['null'],
              'key' => $f['key'],
              'default' => $f['default'],
							'config' => json_encode($config)
						]);
					}
				}
			}
      foreach ( $schema as $t => $vars ){
        if ( isset($vars['keys']) && \is_array($vars['keys']) ){
          foreach ( $vars['keys'] as $k => $arr ){
            $pos = 1;
            foreach ( $arr['columns'] as $c ){
              $this->db->insert_update($this->admin_db.'.'.$this->prefix.'keys', [
                'id' => $t.'.'.$k,
                'key' => $k,
                'table' => $t,
                'column' => $t.'.'.$c,
                'position' => $pos,
                'ref_column' => \is_null($arr['ref_column']) ? null : $arr['ref_db'].'.'.$arr['ref_table'].'.'.$arr['ref_column'],
                'unique' => $arr['unique']
              ]);
              $pos++;
            }
          }
        }
      }
      /*
			foreach ( $projects as $i => $p ){
				$this->db->insert($this->admin_db.'.'.$this->prefix.'projects',[
					'id' => $i,
					'id_client' => $p['id_client'],
					'db' => $p['db'],
					'name' => $p['name'],
					'config' => $p['config']]);
				foreach ( $p['forms'] as $j => $form ){
					$this->db->insert($this->admin_db.'.'.$this->prefix.'forms',[
						'id' => $j,
						'id_project' => $i
					]);
					foreach ( $form as $field ){
						$this->db->insert_ignore($this->admin_db.'.'.$this->prefix.'fields',[
							'id' => $field['id'],
							'id_form' => $j,
							'column' => $field['column'],
							'title' => $field['title'],
							'position' => $field['position'],
							'configuration' => json_encode($field['configuration'])
						]);
					}
				}
			}
       * 
       */
      $this->db->enable_keys();
		}
	}
971496
protected function _update(array $data)
    {
        $data = $this->_setData($data);
        $pmk = $this->getPrimaryKey();
        unset($data[$pmk]);
        $sql = Sql::createSql($this->getAdapter())->update($this->getTableName());
        $event = new Save([
            'action' => Save::UPDATE,
            'data' => $data,
            'abort' => false
        ]);
        $this->getEventManager()->trigger(Save::BEFORE_SAVE, $this, $event);
        if ($event->abort) {
            return false;
        }
        $sql->set($event->data)
            ->where(["{$pmk} = :id" => [':id' => $this->$pmk]])
            ->execute();
        $this->getEventManager()->trigger(Save::AFTER_SAVE, $this, $event);
        return true;
    }
1162174
public function update()
    {
        if( !$this->tableName ) {
            throw new LogicException('No table name specified');
        }
        return $this->database->update()
                ->table($this->tableName);
    }
134759
public function update() {
		$message = new CRUDMessage ( "Modifications were successfully saved", "Updating" );
		$instance = $_SESSION ["instance"] ?? null;
		if (isset ( $instance )) {
			$isNew = $instance->_new;
			try {
				$updated = CRUDHelper::update ( $instance, $_POST );
				if ($updated) {
					$message->setType ( "success" )->setIcon ( "check circle outline" );
					$message = $this->_getEvents ()->onSuccessUpdateMessage ( $message, $instance );
					$this->refreshInstance ( $instance, $isNew );
				} else {
					$message->setMessage ( "An error has occurred. Can not save changes." )->setType ( "error" )->setIcon ( "warning circle" );
					$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
				}
			} catch ( \Exception $e ) {
				$instanceString = $this->getInstanceToString ( $instance );
				$message = new CRUDMessage ( "Exception : can not update `" . $instanceString . "`", "Exception", "warning", "warning" );
				$message = $this->_getEvents ()->onErrorUpdateMessage ( $message, $instance );
			}
			echo $this->_showSimpleMessage ( $message, "updateMsg" );
			echo $this->jquery->compile ( $this->view );
			return $instance;
		} else {
			throw new \Exception ( '$_SESSION["instance"] is null' );
		}
	}
1045771
protected function performUpdate()
    {
        // If the updating event returns false, we will cancel the update operation so
        // developers can hook Validation systems into their models and cancel this
        // operation if the model does not pass validation. Otherwise, we update.
        if ($this->fireModelEvent('updating') === false) {
            return false;
        }

        // First we need to create a fresh query instance and touch the creation and
        // update timestamp on the model which are maintained by us for developer
        // convenience. Then we will just continue saving the model instances.
        if ($this->usesTimestamps()) {
            $this->updateTimestamps();
        }

        // Once we have run the update operation, we will fire the "updated" event for
        // this model instance. This will allow developers to hook into these after
        // models are updated, giving them a chance to do any special processing.
        $dirty = $this->getDirty();

        if (count($dirty) > 0) {
            static::$client::update($this->getKey(), $dirty, $this->attributes);

            $this->fireModelEvent('updated', false);

            $this->syncChanges();
        }

        return true;
    }
561534
protected function performUpdate()
    {
        $params = $this->setKeysForSave();

        // If the updating event returns false, we will cancel the update operation so
        // developers can hook Validation systems into their models and cancel this
        // operation if the model does not pass validation. Otherwise, we update.
        if ($this->fireModelEvent('updating') === false) {
            return false;
        }

        // Send updates
        $results = $this->makeRequest($this->getEndpoint(), 'update', [
            $this->getKey(),
            $params
        ]);

        if ($results) {
            // Update model with new data
            $this->fill($results);

            $this->fireModelEvent('updated', false);
        }

        return true;
    }
1281021
public function update()
        {
                $ok = true;

                // perform updates...
                $ok = $this->updateFile(self::FILENAME_RULES);

                if ($ok)
                        $ok = $this->updateFile(self::FILENAME_CONVERTER);

                return $ok;
        }
367925
public function update($options = array())
    {
        $ret = $this->conn()->selectCollection($this->table_name)->update($this->where, $this->data, $options);
        $this->sql = array('table'=> $this->table_name,'where'=>$this->where, 'update_data'=> $this->data);

        $this->_clear_var();
        return $ret;
    }
821231
public function updateDb()
    {
        $this->createUpdateTableIfNotExists();
        $this->getProcessedFiles();
        
        $path = leedch_resourceMysqlUpdateFolder;
        $files = $this->findNewFiles($path);
        
        $this->processNewFiles($files);
    }
46013
public function updateResult()
    {
        $output = $this->session()->get('dbupdate_result', []);

        $context = [
            'changes' => $output,
            'check'   => null,
            'debug'   => false,
            'alters'  => null,
            'creates' => null,
            'diffs'   => null,
        ];

        return $this->render('@bolt/dbcheck/dbcheck.twig', $context);
    }
648502
protected function _buildUpdate()
        {
            $query = [];
            $query[] = "UPDATE {$this->_quoteIdentifier($this->_table_name)} SET";

            $field_list = [];

            foreach ($this->_dirty_fields as $key => $value) {
                if(!Arrays::exists($key, $this->_expr_fields)) {
                    $value = '?';
                }

                $field_list[] = "{$this->_quoteIdentifier($key)} = $value";
            }

            $query[] = join(", ", $field_list);
            $this->_addIdColumnConditions($query);

            return join(" ", $query);
        }
573033
private function getSQLForUpdate()
    {
        $table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : '');

        return 'UPDATE ' . $table
            . ' SET ' . implode(', ', $this->sqlParts['set'])
            . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '');
    }
73541
public function update($params)
    {
        $query = $this->query->update($params);
        $prepare = $this->db->exec($query);
        if ($prepare) {
            return true;
        }

        return false;
    }
687225
public function updatedAtToday()
    {
        /* @var $this ActiveQuery */
        $model = $this->noInitModel;
        $start = strtotime(date('Y-m-d'));
        $end = $start + 86400;
        if ($model->timeFormat == BaseEntityModel::$timeFormatDatetime) {
            $start = gmdate('Y-m-d H:i:s', $start);
            $end = gmdate('Y-m-d H:i:s', $end);
        }
        return $this->updatedAt($start, $end);
    }