'Create a update query of table with data, and use where data for
the WHERE clause'

def create_update_query(self, table, data, where_data):

    query = (u'UPDATE    %s    set    ' % (self.table_prefix + table))
    query_follow = ''
    i = 0
    for prop in data:
        if (prop not in where_data):
            i += 1
            val = data[prop]
            if isinstance(val, bool):
                if val:
                    val = 1
                else:
                    val = 0
            val = self.stringify(val)
            if (i == 1):
                query_follow += (u"%s='%s'    " % (prop, val))
            else:
                query_follow += (u",    %s='%s'    " % (prop, val))
    where_clause = u'    WHERE    '
    i = 0
    for prop in where_data:
        i += 1
        val = where_data[prop]
        if isinstance(val, bool):
            if val:
                val = 1
            else:
                val = 0
        val = self.stringify(val)
        if (i == 1):
            where_clause += (u"%s='%s'    " % (prop, val))
        else:
            where_clause += (u"and    %s='%s'    " % (prop, val))
    query = ((query + query_follow) + where_clause)
    return query
