Organize time table in Database [closed]

0

For constructing a table on the site that will contain a listing of all days of the week, how can I create these tables in the database? For example:

Bus line schedules from one city to another:

From CityA to cityB

Mon to Fri

7:00 a.m. 7:30 a.m. 10:00 a.m.   ...

Sab

7:15 p.m. 11:30 a.m.

Sun

12: 00h

...

CityB to CityC

.....

How do I organize the days of the week and bank hours? so that the system admin itself can change this information constantly.

    
asked by anonymous 27.09.2015 / 23:44

1 answer

1

You can organize as follows:

id_horario // auto increment
id_linha // linha pré cadastrada
id_saida // cidade saida
id_destino // cidade destino
dia_da_semana // segunda a domingo 
horario // horário de saida

Based on this table, you insert the time and line records of the buses. When you are recording, check if you already have this schedule scheduled on this line, if you do not have it, save it, if you have edited it.

I hope I have helped!

    
28.09.2015 / 03:07