->MYSQLI ERROR: query() select distinct st1.tuid, '20180117' as yyyymmdd, 'Tue' as day from att_sta_tra st1 join att_sta_tra st2 on st2.tuid = st1.tuid join att_mca_schedule sch on st1.tuid = sch.tuid join att_location loc1 on loc1.schKey = sch.autokey and loc1.stationcode = st1.stationcode join att_location loc2 on loc2.schKey = sch.autokey and loc2.stationcode = st2.stationcode and loc2.autokey > loc1.autokey where st1.stationcode = 'HMN' and st2.stationcode = 'ACC' and '20180116' between sch.effDateFrom and sch.effDateTo and effDaysTue = 1 and ( loc1.pubDep < sch.pubDep && loc1.pubDep >= '133100' ) and loc1.pubDep is not null order by loc1.pubDep asc, sch.pubDep limit 16 Table 'a1pukr.att_sta_tra' doesn't exist