Organize schedules in the Database

Asked

Viewed 466 times

0

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

Bus line schedules from one city to another:

From Citadel to cityeB

Seg à Sex

7:00 am 7:30 am 10:00 ...

Sab

7:15 am 11:30 am

Gift

12:00

...

Cidadeb to the Cidadec

.....

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

1 answer

1


You can arrange 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 enter the schedules and bus lines records. When you go to record, check if you already have this scheduled time on this line, if you don’t have it, save it, if you have edit.

I hope I’ve helped!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.