->MYSQLI ERROR: query() select distinct st1.tuid, '20180221' as yyyymmdd, 'Tue' as day , loc1.pubDep from AttStaTra st1 join AttMcaSchedule sch on st1.tuid = sch.tuid join AttLocation loc1 on loc1.schKey = sch.autokey and loc1.stationcode = st1.stationcode where st1.stationcode = 'RML' and '20180220' between sch.effDateFrom and sch.effDateTo and effDaysTue = 1 and ( loc1.pubDep < sch.pubDep && loc1.pubDep >= '123500' ) and loc1.pubDep is not null order by loc1.pubDep asc, sch.pubDep limit 12 Table 'a1pukr.AttLocation' doesn't exist