I'm working on a script for my work to rent bicycles, but i dont know how to check the availability of bicycles for an X period
Database looks like:
CustomerID BicycleID FromDATE TillDATE
43 12 2012-05-20 2012-05-23
43 14 2012-05-20 2012-05-23
44 12 2012-05-27 2012-05-30
44 15 2012-05-27 2012-05-30
Is there a script what i can run before i make a new contract or reservation to check or the bicycle is available for a period of time?
Any help on this would be great, thanks!