Addam Posted September 16, 2004 Posted September 16, 2004 Hi Everyone! I'm doing some conversions for a client and I'm trying to find date conflicts in scheduling. Now, I've successfully broke down the day's and times to UNIX time. SETUP: 1) I gather the requestors information $startDate and $endDate. 2) I gather the information from the database for that user. PROBLEM: I'm having trouble trying to get a handle to conflicts in date and start times. Logically I would step through each record and say: "if the requested start date is BEFORE the database END DATE but NOT AFTER the database START DATE, then all is well..." else return an error. I think I'm headed in the right direction but I'm lost as to HOW to put this together in PHP Syntax. Can anyone help!? Thanks a bunch!
Garry Claridge Posted September 16, 2004 Posted September 16, 2004 Could be: if ($startDate < $endDate && $startDate < $DBstartDate) { .... Good Luck. Garry
Addam Posted September 17, 2004 Author Posted September 17, 2004 That's it! I also had some rearanging of code to do but that was correct. I guess after you work for 10 hrs. straight, your brain starts to cook! Thanks!
Recommended Posts
This topic is 7441 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now