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! Link to comment https://forums.phpfreaks.com/topic/115324-reservation-application-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/115324-reservation-application-problem/#findComment-592904 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 Link to comment https://forums.phpfreaks.com/topic/115324-reservation-application-problem/#findComment-592910 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.