public function updateRecord($tablename, $parameters, $where)
    {
        $update = array();

        foreach ($parameters as $name => $value) {
            $update[] = "$name = " . $this->quote($value) . "";
        }

        $sql = "UPDATE ". $tablename ." SET ". implode(",", $update) . " WHERE " . $where;

        return $this->write($sql, DatabaseInterface::AFFECTED_ROWS);
    }