lynchpin Posted December 9, 2008 Share Posted December 9, 2008 Hello, I have browsed through the board but cant find anything similar to what I require. I am building a booking system and I have multiple views, day/week/month for the booking calendar. I have been able to get the day view working, but now am stuck. I cant find a way to retrieve the bookings for a given week from my database. I tried the following query: ------------------------------------------------------------------ select * from bookings where '2008-12-07 00:00:00' AND '2008-12-14 00:00:00' BETWEEN bookings.starting_date AND bookings.ending_date; ------------------------------------------------------------------ My bookings table has the following fields ------------------------------------ booking_id user_id subject location starting_date ending_date description date ----------------------------------- Thanks Link to comment https://forums.phpfreaks.com/topic/136222-booking-system-bookings-per-week/ Share on other sites More sharing options...
revraz Posted December 9, 2008 Share Posted December 9, 2008 Try to do it where your Start date is => than and your End date is =< than, the range you want. Link to comment https://forums.phpfreaks.com/topic/136222-booking-system-bookings-per-week/#findComment-710593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.