Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. 1. is the users which keeps uid and login info(username and password)
  2. 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. 3. Avatar - the table which will describe the avater.
  4.  
  5. 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)
  6.  
  7. INSERT IGNORE INTO users(username, password) VALUES( 'username','passwd');
  8. 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