dunksy Posted May 19, 2006 Share Posted May 19, 2006 Good afternoon.Right I am currently developing an availability and price checker for a hotel, and they want to be able to specify a price by date range. So they may enter a strt date, end date, and the price they wish to assign to all dates within that range.Rather than store in a table a start date, end date and then price, i am thinking of storing one entry per day and store the price set. The reason being is that if they set the dates between June 1st 2006 and June 10th 2006 to price x, then go back, and set the dates between May 15th and June 15th there is going to be an overlap.I therefore need to be able to take two dates and a price as input to my function, and the function would, for all dates occuring between these two, check the table to see if the entry is there for that specific date, and if not create one, if it is, then update it.Sounds simple but I have still not got to grips with mktime() date() and the other date manipulation tools, and other tutorials do not seem to be helping me.Any help would be greatly appreciated.regards,Duncan Quote Link to comment https://forums.phpfreaks.com/topic/10012-date-manipulation/ Share on other sites More sharing options...
Barand Posted May 19, 2006 Share Posted May 19, 2006 So what's the structure of your table? How are you storing the dates? Quote Link to comment https://forums.phpfreaks.com/topic/10012-date-manipulation/#findComment-37251 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.