The idea is user can chose one line and one road and get the schedule
can someone help me with one mysql query?
I have 3 tables on my database
Id | RoadName
1 | StackoverflowRoad
Id | Linename
1 | StackoverflowLine
HoursLineId | HoursRoadId | hours
1 | 2 | 8:35:13
you have to use inner join in order to join the 3 tables based on foreign keys.
SELECT * FROM hours INNER JOIN Roads ON Roads.Id=hours.HoursRoadId INNER JOIN Lines ON hours.HoursLineId=Lines.Id where Roads.Id='Your ID' AND Lines.Id='Your Id';
This will get the schedule after filtering by Line Id and Road Id.