src/Database/Database.php
protected function public__update($table_name, array $data_to_update, $where = NULL, array $bind_params_for_where_part = [])
    {
        \ksort($data_to_update);
        $fieldDetails = '';
        foreach ($data_to_update as $key => $value)
        {
            $fieldDetails .= $this->quoteColumnName($key) . "=:$key,";
        }
        $fieldDetails = \rtrim($fieldDetails, ',');
        $sqlQuery = "UPDATE " . $this->quoteTableName($this->getPrefixedTableName($table_name)) . " SET $fieldDetails" . ($where != NULL ? " WHERE $where;" : ";");
        $sth = $this->getPDOInstance()->prepare($sqlQuery);
        foreach ($data_to_update as $key => $value)
        {
            $sth->bindValue(":$key", $value, $this->getPdoType(\gettype($value)));
        }
        foreach ($bind_params_for_where_part as $key => $value)
        {
            $sth->bindValue("$key", $value, $this->getPdoType(\gettype($value)));
        }
        return $sth->execute();
    }
protected function public__update($table_name, array $data_to_update, $where = NULL, array $bind_params_for_where_part = [])
    {
        \ksort($data_to_update);
        $fieldDetails = '';
        foreach ($data_to_update as $key => $value)
        {
            $fieldDetails .= $this->quoteColumnName($key) . "=:$key,";
        }
        $fieldDetails = \rtrim($fieldDetails, ',');
        $sqlQuery = "UPDATE " . $this->quoteTableName($this->getPrefixedTableName($table_name)) . " SET $fieldDetails" . ($where != NULL ? " WHERE $where;" : ";");
        $sth = $this->getPDOInstance()->prepare($sqlQuery);
        foreach ($data_to_update as $key => $value)
        {
            $sth->bindValue(":$key", $value, $this->getPdoType(\gettype($value)));
        }
        foreach ($bind_params_for_where_part as $key => $value)
        {
            $sth->bindValue("$key", $value, $this->getPdoType(\gettype($value)));
        }
        return $sth->execute();
    }
update

@param string $table_name A name of table to insert into
@param array $data_to_update An associative array
[
'tableColumnName1' => 'value',
'tableColumnName2' => 'value',
'tableColumnNameN' => 'value',
]
@param string $where the WHERE query part AFTER the WHERE word
eg. $sqlQuery = "UPDATE `" . $tableName . "` SET $dataToUpdate WHERE " . $where . ";";
so the last part is used for the $where
@param array $bind_params_for_where_part
[
':id1' => 'someValue1',
':id2' => 'someValue2',
':idN' => 'someValueN',
]
@return integer Returns the number of affected rows