I'm making a logging script, and its based on tasks/rules that has the Time aswell as Limit Before and After this time when its OK to insert a logg. If the time is more or less then the limit's it shall give false.
I can't figure out how I by SQL make this if there is any task by between the current time.
Lets say I current time 06:57:00 trying to logg - it shall find the post that is ruled as limit before 06:55:00 and max after 07:05:00. If my current time would be 07:06:00 it should not be able to find this task post.
The task/rule table:
ID
Name
Time
TimeLimitBefore
TimeLimitAfter
It's when it's have the Dynamic Time Limits from the same table that makes the headache for me, if it would be static time +/- limits it would just be to make BETWEEN statement. time BETWEEN '06:55:00' AND '07:05:00