Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Baza danych: xyz
- --------------------------------------------------
- tabela 'users'
- --------------------------------------------------
- id first_name last_name
- 1 Janusz Pawlacz
- 2 Waldek Pawlacz
- --------------------------------------------------
- --------------------------------------------------
- tabela 'users_registration'
- --------------------------------------------------
- id user_id teacher_id subject_id
- 1 1 2 1
- --------------------------------------------------
- user_id = id w tabeli user
- teacher_id = id w tabeli user
- subject_id - id w tabeli users_subjects
- --------------------------------------------------
- tabela 'users_subjects'
- --------------------------------------------------
- id subject_name
- 1 Matematyka
- --------------------------------------------------
- --------------------------------------------------
- tabela 'users_attendence'
- --------------------------------------------------
- id date visited records_id
- 1 2019-09-17 1 1
- --------------------------------------------------
- records_id = id w tabeli 'users_registration'
- ------------------------------------------------------------------------------------------------------------------------
- Potrzebuje wygenerować tabelkę z danymi:
- Data (users_attendence->date) Obecność (users_attendence->visited) Przedmiot (users_registration->subject_id a potem users_subjects->subject_name) Nauczyciel (users_registration->teacher_id a potem users->first_name + last_name
- Macie jakiś pomysł jak to zrobić najoptymalniej ?
Advertisement
Add Comment
Please, Sign In to add comment