Answer the question
In order to leave comments, you need to log in
How to create a one to many relationship in phpMyAdmin?
Good afternoon!
Interested in the question, how to create a relationship between tables type "one to many"?
I have tables "Parents", "Children", "Photos" and "Notes", I want to make sure that parents have many children, and children have many photos and notes, but if I create two children for one parent, on phpMyAdmin starts to swear at me:
Duplicate entry '*' for key 'Parent'
Answer the question
In order to leave comments, you need to log in
Didn't they tell you "about it" in school? The child has two parents.
Duplicate entry '*' for key 'Parent'Remove uniqueness from this key.
CAST( DATEDIFF( Year, BirthDay, ISNULL( DeathDay, GETDATE())) + ( SIGN ( DATEDIFF ( DAY, BirthDay, DATEADD ( YEAR, YEAR( BirthDay ) - YEAR( ISNULL( DeathDay, GETDATE()) ), ISNULL( DeathDay, GETDATE())))) - 1 ) / 2 AS VARCHAR)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question