Hi People.
Got a small issue, although its big for me........
I'm using phpmyadmin....
I have 2 tables....
My First table is 'user' which has 4 columns ( eventid, Name, Email, Address ) ( eventid is the primary key)
My Second table is 'trips' and it has 6 colums ( tripid, eventid, firsttrip, secondtrip, thirdtrip,fourthtrip ) (tripid is the primary key and eventid is the foreign key)
I made eventid as INDEX in the trips table.
Problem is while establishing relationships between theae 2 tables.
I clicked on the child table (trips) clicked on Relation View
And I get 2 dropdown lists
tripid is having these options....
trips ---> tripid
trips ---> eventid
user ---> eventid
eventid is having these options....
trips ---> tripid
trips ---> eventid
user ----> eventid
And then ON DELETE --> CASCADE ON UPDATE--> CASCADE
no matter what option i select I'm getting an error...
Cannot add or update a child row: a foreign key constraint fails (`jauntyroads/trips`, CONSTRAINT `trips_ibfk_1` FOREIGN KEY (`eventid`) REFERENCES `trips` (`eventid`) ON DELETE CASCADE ON UPDATE CASCADE)
Any idea experts...??
Sorry for te lengthy post
Regards