Performs a UPDATE query
@param $table
@param array $data
@param array $conditions
@param bool $filter
@return integer
772264
public function update($table, array $data, array $conditions, $filter = true)
    {
        if ($filter) {
            $data = $this->filterValues($table, $data);
        }

        if (empty($data)) {
            return 0;
        }

        $farray = array();
        foreach (array_keys($data) as $key) {
            $farray[] = "$key=:$key";
        }

        $carray = array();
        foreach (array_keys($conditions) as $key) {
            $carray[] = "$key=:$key";
        }

        $fields = implode(',', $farray);
        $sql = "UPDATE $table SET $fields WHERE " . implode(' AND ', $carray);

        $stmt = $this->pdo->prepare($sql);

        foreach ($data as $key => $value) {
            $stmt->bindValue(":$key", $value);
        }

        foreach ($conditions as $key => $value) {
            $stmt->bindValue(":$key", $value);
        }

        $stmt->execute();
        $this->executed[] = $sql;
        return $stmt->rowCount();
    }
945093
public function update(array $data, $where)
    {
        $tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
        return $this->_db->update($tableSpec, $data, $where);
    }
225763
public static function updateOne($conditions, array $data)
    {
        $db = static::getDb();
    
        $bool = $db->update(
            (new self())->getSource(),
            array_keys($data),
            array_values($data),
            $conditions
        );

        return $bool;
    }
1138816
public function update($tableName, array $data, $where = null)
    {
        return $this->pdo->update($tableName, $data, $where);
    }
205094
protected function doUpdateBatch($data, array $conditions)
    {
        !$this->useTransaction ?: $this->db->getTransaction(true)->start();

        try {
            $result = $this->db->getWriter()->updateBatch($this->table, $data, $conditions);
        } catch (\Throwable $e) {
            !$this->useTransaction ?: $this->db->getTransaction(true)->rollback();

            throw $e;
        }

        !$this->useTransaction ?: $this->db->getTransaction(true)->commit();

        return $result;
    }
525878
public function updateInDatabase($table, array $data, array $criteria = [])
    {
        $query = $this->_getDriver()->update($table, $data, $criteria);
        $parameters = array_merge(array_values($data), array_values($criteria));
        $this->debugSection('Query', $query);
        if (!empty($parameters)) {
            $this->debugSection('Parameters', $parameters);
        }
        $this->_getDriver()->executeQuery($query, $parameters);
    }
316106
public static function update($data = [], $where = [], $field = null)
    {
        $model = new static();

        if (!empty($field)) {
            $model->allowField($field);
        }

        $result = $model->isUpdate(true)->save($data, $where);

        return $model;
    }
953981
public function update($table, $params, $where) {
		$params = $this->filter_table_data($table, $params, $this);

		$keys = array_keys($params);
		foreach ($keys as $key => $value) {
			$keys[$key] = $this->quote_identifier($value);
		}

		$query = 'UPDATE ' . $this->quote_identifier($table) . ' SET ';

		$first = true;
		foreach ($params as $key => $value) {
			if (!$first) {
				$query .= ', ';
			}
			$query .= $this->quote_identifier($key) . '= ?';
			$first = false;
		}

		$query .= ' WHERE ' . $where;

		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
296781
public static function whereAndClause($tableName, $data, $condition)
    {
        $where = "";
        $counter = 0;
        $arraySize = count($data);

        if ($data !== null) {
            foreach ($data as $key => $value)
            {
                $counter++;
                $columnName = self::checkColumn($tableName, self::sanitize($key));
                $where .= $tableName.'.'.$columnName ." = '".self::sanitize($value)."'";
                if ($arraySize > $counter)
                {
                    $where .= " " . $condition . " ";
                }
            }
        } else {
            $where = "";
        }

        return $where;
    }
630841
public function update($data = [], $wheres = [])
    {
        if (is_array($wheres) && count($wheres) > 0) {
            foreach ($wheres as $column => $column_value) {
                if (is_array($column_value)) {
                    $this->db->where($column, $column_value, self::OPERATOR_IS_IN);
                } else {
                    $this->db->where($column, $column_value, self::OPERATOR_EQUAL_TO);
                }
            }
        }
        if ($this->db->update($this->table, $data)) {
            return (int) $this->db->count;
        }

        return 0;
    }
1112361
public function delete($table, $condition, array $params = [])
    {
        $request = $this->db->getQueryBuilder()->delete($table, $condition, $params);

        return $this->setRequest($request);
    }
516700
public function update($table, $set, $where, $bind = array())
    {
        $sql = "UPDATE " . $table . " SET ";

        if(is_array($set)) {
            foreach($set as $field => $value) {
                $sql .= $field ." = ". $value . ",";
            }

            $sql = rtrim($sql,",");

        }else{
            $sql .= $set;
        }


        $sql .= " WHERE " . $where . ";";

        $bind = $this->cleanup($bind);

        return $this->run($sql, $bind);
    }
463104
protected function update(array $data = array(), array $criteria)
    {
        $set = array();
        foreach ($data as $columnName => $value) {
            $set[] = "$columnName = ?";
        }
        
        $params = array_merge(array_values($data), array_values($criteria));
        
        $sql = "UPDATE $this->_table SET " . implode(', ', $set)
                . " WHERE " . implode(' = ? AND ', array_keys($criteria)) . " = ?";
        
        $pdos = $this->_pdo->prepare($sql);
        
        $pdos->execute($params);
        
        return $pdos->statement()->rowCount();
    }
970775
function update($tableName, $values, $wheres)
  {
    assert(is_array($values));
    assert(is_array($wheres));

    $v = [];
    foreach ($values as $key => &$value)
      $v[] = "`$key`=".$this->quote($value);

    $w = $this->makeClauses($wheres);

    $this->q
    (
      "update $tableName set ".
      implode(",",$v).
      " where ".
      implode(" and ",$w)
    );
  }
190886
public function update(array $data = [])
    {
        $sql = 'update `' . $this->table . '` set ';
        $sql .= Util::rangeField(Util::add2points(array_keys($data)));

        if (!is_null($this->where)) {
            $sql .= ' where ' . $this->where;

            $this->where = null;

            $data = array_merge($data, $this->where_data_binding);

            $this->where_data_binding = [];
        }

        $stmt = $this->connection->prepare($sql);

        $data = Sanitize::make($data, true);

        $this->bind($stmt, $data);

        // Execution of the request
        $stmt->execute();

        $r = $stmt->rowCount();

        return (int) $r;
    }
822041
public function update($table, array $values = null)
    {
        $builder         = new Update($this->driver);
        $this->lastQuery = $builder;

        if ($values) {
            $builder->values($values);
        }

        return $builder->update($table);
    }
166757
public function update($table, array $data, $conditions)
    {
        $nameFields = array_keys($data);
        $preparedValues = $this->prepareValues($data);
        $queryString = "UPDATE {$table} SET ";

        $fNumber = 0;
        foreach ($preparedValues as $key => $value) {
            unset($value);
            $queryString .= "{$nameFields[$fNumber]} = {$key}, ";
            $fNumber++;
        }

        $queryString = preg_replace('/,\ $/', ' ', $queryString);
        $queryString .= "WHERE {$conditions};";

        $this->query($queryString, $preparedValues);

        return $this->getAffectedRows();
    }