When I try to execute the below SQL command :
INSERT INTO mytest_usershosts (RID,userid,hid,Usr,Pass)
I am facing the below error message :
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint f
ails (`dm`.`mytest_usershosts`, CONSTRAINT `mytest_usershosts_ibfk_1` FOREIGN KEY (`
userid`) REFERENCES `mytest_users` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE)
I have already looked into many similar cases, but I am unable to find any solution.
Is there anyone who have faced the same issue and knows the fix for the issue?