update acs_events set name = :name where event_id= :reservation_id select interval_id from timespans where timespan_id in ( select timespan_id from acs_events where event_id = :reservation_id ) select room_id from rr_reservations where reservation_id = :reservation_id select 1 from rr_reservations where reservation_id = :reservation_id and reserving_user = :user_id