A Picture is worth thousand word. In the above picture we can add FK constraint 1-1, like I can reference UserId to another tables column but If the situation is like this ,
ALTER TABLE `userfrnd_source`
ADD CONSTRAINT `userfrnd_source_ibfk_2` FOREIGN KEY (`userId`,`friendId`)
REFERENCES `user` (`userId`,`friendId`)
ON DELETE CASCADE ON UPDATE CASCADE
How can I do this through PHPMyadmin, I know Using SQL
we can do but with this tab is it possible?