Hi all, I've just launched a website where people can hire out equipment. Users can check online whether an item is available for their particular dates. However, I have a problem where things are becoming double booked. I'm checking for existing orders by using the following:

Code MySQL:
SELECT * FROM hire_order AS o JOIN hire_order_products AS op ON o.order_id = op.order_id WHERE product_id = 2 AND ((post_date BETWEEN ('2012-08-10') AND ('2012-08-14')) OR (home_date BETWEEN ('2012-08-10') AND ('2012-08-14'))) AND order_returned < 2

However, this isn't picking up orders that have been delivered before this and are still out on hire. Any ideas or help would be appreciated