public function buildUpdateQuery($table, $data, $where, $limit)
    {
        $sql = "UPDATE " . $this->quoteSpecialName($table) . " SET ";

        $values = '';

        foreach ($data as $key => $value) {
            if (!empty($values)) $values .= ', ';
            $values .= $this->quoteSpecialName($key) . ' = ' . $this->escapeItem($value);
        }

        $sql .= $values . ' WHERE ' . $where;

        if (!empty($limit)) {
            $sql .= ' LIMIT ' . $limit;
        }

        $sql .= ';';

        return $sql;
    }