⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Triple relational table



dsalme

dsalme
  • profile picture
  • Member

Posted 22 February 2013 - 13:34 PM

Hello! 1st of all, i have the worst english ever, so i hope you can understand my doubts...

 

Well, i have the next problem:

 

I have 3 tables (students, teachers and schedule)

 

And i want to make an intermediate table between those 3, lets say STC (for StudensTeachersSchedule).

 

So i have all those tables, then, first, i make a CRUD for shedules..

 

Next, i make a CRUD for Teachers, and in that crud i set a relation_n_n to assign hours to a teacher.

 

At last, i make the crud for students, and in that crud, i choose 1 or more teachers, and depending on those teachers schedules, i select hours for that student...

 

So... in STC (the relational table), i have 4 fields... the table id, the scheduleid (an id for each interval of time), the teacherid, and the student id.

 

In a first stance, i assign hours of the shedule to the teacher, so in STC i have the teacher and the shedule id, so the studentsid is null...

Then i want to fill that studentsid slot, when i asign a teacher and a shedule (depending on the teacher i selected) when i add an student...

 

I know its a mess, i hope you can help me with that...

 

THX for all, its a great tool :)