Hello,
I have 2 date fields in a sql table i.e: StartDate and EndDate. I get 2 dates from user those are also StartDate and EndDate. Now i have to make 3-4 queries so that i can check if the user specified dates are not in collision with dates in DB.
1. If StartDate = StartDate (i have got this)
2. If EndDate = EndDate (i have got this)
3. If StartDate is in between the date range of db's StartDate or EndDate
Means if there is date like: 1-1-2005 and 5-1-2005 in db. And if user StartDate is 4-1-2005 then it should tell me that it exists.
4. Same as 3 for End Date if EndDate is between the DB's date range then i should get message saying it exists.
For now i think only want these 2 which i am unable to find how will i do it. If there is some php function in whcih i can check if the StartDate is in between 2 specified dates or equal to them then it will save me one hell of a time.
Please help too urgnt.
Thanks




Reply With Quote