it shows the following error in php_error_log file :
PHP Question2Answer MySQL query error 1452: Cannot add or update a child row: a foreign key constraint fails (`q2a`.`qa_userfavorites`, CONSTRAINT `qa_userfavorites_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `qa_users` (`userid`) ON DELETE CASCADE) - Query: INSERT IGNORE INTO qa_userfavorites (userid, entitytype, entityid, nouserevents) VALUES ('2', 'Q', 5, 0)