BloodyMind Posted July 17, 2008 Share Posted July 17, 2008 now i have my database contains the table of bookings:has start date, and end date but i want to know the logic to check if some bikes are available or not! Quote Link to comment Share on other sites More sharing options...
ratcateme Posted July 17, 2008 Share Posted July 17, 2008 i don't know how the dates are in the database but if they are mysql dates or unix time stamps you could do this SELECT * FROM `bikes` WHERE `start_date` <= $current_time AND `end` <= $current_time this will only work if the bike has been checkout and returned though if the bike is new and not been reserved it won't show up. SCott. Quote Link to comment Share on other sites More sharing options...
BloodyMind Posted July 17, 2008 Author Share Posted July 17, 2008 thanks alot I can make a default value of a date to solve this thanx alot for your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.