Answer the question
In order to leave comments, you need to log in
What is the correct way to create a MySQL database view with multiple sub-columns?
The bottom line is to make a database in MySQL with data on bus numbers, stations, arrival and departure times.
I can't figure out how to correctly present this database, so that later I can easily extract the necessary data using php.
For example, a person chose the departure time and departure station - he was offered options for buses with the nearest time, or he chose the bus number and the entire schedule was displayed.
This is how the data table looks like in excel
SELECT `bus`, `stations`, `time_departure` FROM `table_name` WHERE (`time_departure` BETWEEN '00:06' AND '00:35') AND (`stations` LIKE 'Фрязики')
Answer the question
In order to leave comments, you need to log in
store time in the time format , and not some obscure
UPD bullshit:
firstly, put the route numbers in a separate table, and secondly, put the stops in a separate table. And then the table will look like this:
id | route_id | station_id | arrival_time | departure_time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question