def get_locations_id_for_object(conn, obj_id):
    """Given an object_id, it returns the id of all of the locations associated to it"""
    cur = conn.cursor()
    cur.execute("SELECT id FROM locations WHERE object_id == ?;", (obj_id,))
    # this gives the ids of the measurements taken at this place
    results = cur.fetchall()

    return results