こんにちは、私は問題を抱えています。
両方とも異なる結果を返す 2 つの SQL クエリがあります。
SELECT name, capacity, $price, licensed, cost
FROM venue, catering WHERE venue.venue_id = catering.venue_id
AND grade=$grade
AND capacity >= $minCapacity
AND capacity <= $maxCapacity
AND venue.venue_id
NOT IN (SELECT venue_id FROM venue_booking WHERE date_booked = $us_date)
としても
SELECT venue.venue_id,name,capacity,licensed,$price,cost
FROM venue
JOIN catering ON venue.venue_id = catering.venue_id
WHERE capacity BETWEEN '$minCapacity' AND '$maxCapacity'
AND venue.venue_id NOT IN
(SELECT venue_id
FROM venue_booking
WHERE date_booked = '$us_date')
AND catering.grade = '$grade' ORDER BY venue.capacity
ここでの違いは何ですか?