I am trying to get 'business_id' and 'rating' from the table 'reviews' where 'review_id' is $approveReviewID
and then update 'rating' in 'business_details' with this retrieved rating from 'reviews' where 'business_id' is equal to that retrieved.
I have these two queries,
SELECT business_id, rating FROM reviews WHERE review_id = '$approveReviewID'
UPDATE business_details SET rating = rating + $rating WHERE business_id = '$businessID
is there a way to join these queries into one?