I have 6 tables
1. course
2. groups
3. group_members
4. group_events
5. events
6. users

"Users" is the parent table for group_members
"Courses" is the parent table for groups
"events" is the parent table for group_events
"groups" is the parent table for group_members and group_events

(Parent table here means that the PK in the parent table is the FK in
child table)

I can set referential/foreign keys correctly for group_members,
group_events.

However,when I try to set up referential for "groups",it always fails
(error 1452 "cannot add or update a child row: foreign key constaint
fails").

The`PK in groups is id, which is referenced by groups_id in
group_members and group_events.

The PK in course is id, which I want to have it referenced by
course_id in table "groups".

Type & size are the same for id in courses and course_id in groups.

Can anyone suggest me where I made mistake?

Thanks,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to