我正在努力解决下面的问题。 它真的很慢,我无法弄清楚如何使它更有效?
SELECT * FROM cBookings
INNER JOIN cBookings_details ON cBookings.cBookings_id=cBookings_details_cBookings_id
INNER JOIN cCustomers ON cBookings.cBookings_cCustomers_id=cCustomers.cCustomers_id
INNER JOIN cObjects ON cBookings_details.cBookings_details_cObjects_id = cObjects.cObjects_id
WHERE cBookings_details.cBookings_details_cObjects_id = '".$oid."'
AND cBookings_details.cBookings_details_arrival <= '".$firstday."'
AND cBookings_details.cBookings_details_departure >= '".$firstday."'
GROUP BY(cBookings_details.cBookings_details_cObjects_id)