I have a procedure
CREATE procedure usp_set_night_free(IN booking_id_param bigint) BEGIN DECLARE @price_per_night INT; SELECT b.price INTO @price_per_night FROM booked_rooms as b WHERE b.booking_id = booking_id_param LIMIT 1; UPDATE bookings as b JOIN booked_rooms b2 on b2.id = b.id SET b.total_price = b.total_price - @price_per_night WHERE b.id = b2.booking_id; END;
But get - ResultSet is from UPDATE. No Data. - and I don't know where the problem could be. Help is appreciated.