mysql - Fetch Table data based on multiple timing referred from other table -


Text after "

I have 2 tables in which there is a schedule and other table availability times. The structure is as follows: There may be several rows for the user in tbl_useravailability for tbl_schedules ID int useridit schedulefrom Datetime schedulletill Datetime tbl_useravailability id userid availablefrom availabletill

On the same day. This user may be available from 2014: 10: 17 05:00:00 to 2014: 10: 17 12:00:00, 2014: 10: 17-15:00:00 to 2014: 10: 17 18: 00: 00, 2014: 10: 17 19:00:00 2014: 10: 17 23:00:00

The challenge is to schedule the program for other users, available in the table Availability day like where userid & lt; & Gt; 1;

After text "itemprop =" text ">

How about something like the following (less than the visual sample):

  as the scheduleid, S.userid, S.schedulefrom, S.scheduletill, UA.id availabilityid, UA.availablefrom, UA.availabletill S.id selection, tbl_schedules, form SUA Include tbl_useravailability in User ID on S = UA.userid and S.schedulefrom & gt; = UA.availablefrom and S.scheduletill & lt; = UA.availabletill Where S.userid & lt; & Gt; 1  

This will show you all users whose availability is within their scheduled time.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -