I have Kids and I have Sports.
I have a checkbox list of Sports for each Kid.
Let’s say I make a Kid, and assign him to all 5 sports.
It works, great.
Let’s say I make another Kid(Kid2), and assign him to all 5 sports. I
get this error:
Mysql::Error: Duplicate entry ‘2’ for key 1: INSERT INTO kids_sports
(sport_id
, kid_id
, id
) VALUES (2, 10, 2)
And my kids_sports table looks like this:
id kid_id sport_id
Edit Delete 2 8 2
Edit Delete 3 8 3
Edit Delete 4 8 4
Edit Delete 6 8 6
Edit Delete 7 8 7
Why the heck is it doing that? Why isn’t id 1,2,3,4,5 etc like it
should(?) be?