def get_multiple_ids_string(queryset):
    """Returns a string of ids from a queryset for use in a SQL query"""
    querystring = ""
    for counter, modobj in enumerate(queryset):
        querystring += ", %s" % modobj.id if counter > 0 else "%s" % modobj.id
    return querystring