Thursday, 22 August 2013

find instructor free times in mysql ph

find instructor free times in mysql ph

I have a table in mysql like this:
+------------+------------+------------+------------+
| user_id | inst_id | date_start | date_end |
+------------+------------+------------+------------+
| 20 | 1 |1375344000 |1375351200 |
+------------+------------+------------+------------+
it tried about 20 queries but couldn't come up with an idea to get inst_id
result within any given range time. for example i want to know which
inst_id are available from 2013-08-01 8:00 to 2013-08-01 10:00

No comments:

Post a Comment