Hello,
I'm working on a scheduling application and want to validate new entries so things don't overlap.
There is a table called Activities which has 2 important columns, TimeStamp (UNIX timestamp) and Duration.
Lets say there are these rows:
TimeStamp = 1000, Duration = 500
TimeStamp = 2000, Duration = 250
So this means the time from 1000 to 1500, and the time from 2000 to 2250 is reserved.
Now if someone wants to start an activity at 1200, it will tell you that spot is taken.
If they start one at 1500 and it overlaps onto another activity it will tell you also.
I am using PHP4 and MySQL 3.23 and have tried the BETWEEN statement to no luck. Does anyone have experience with this type of problem?