I have a table , there are 4 fields: name
, start date and time
(Timestamp) ,end date and time
(timpestamp) , car
.
In Java/MySQL,
I need to compare database start date time and end start date time and compare with value given in textbox date time field .
Now problem is that we need to book person(driver) and car, if car and person are not booked in given time (that is checked by database) , then we can booked it else not.
Please tell me a logic/query to do this. If you have code please mention it.