Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. is the users which keeps uid and login info(username and password)
- 2. is the users_info table which keep firstname, lastname mail age avatarid and gender there is column uid which foreign key is the ui from the users table where the login information is keeped. Avatarid is foreign key from another table which describe the avatar
- 3. Avatar - the table which will describe the avater.
- Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`soc_network`.`user_info`, CONSTRAINT `uid` FOREIGN KEY (`uid`) REFERENCES `users` (`uid`) ON DELETE NO ACTION ON UPDATE NO ACTION)
- INSERT IGNORE INTO users(username, password) VALUES( 'username','passwd');
- INSERT IGNORE INTO user_info(firstname, lastname, age, gender, email) VALUES('firstname','lastname','11', 'gender', 'mail')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement