two QA sites with one user database, login and login out are ok. But when adding a new post at the second QA site(share the first QA site' user database), error:
Question2Answer query failed:
INSERT INTO juku_posts (categoryid, type, parentid, userid, cookieid, createip, title, content, format, tags, notify, created) VALUES (NULL, _utf8 'Q', NULL, _utf8 '1', NULL, INET_ATON(_utf8 '125.122.87.4'), _utf8 'I\'ll perish you represented the moon!', _utf8 '我要代表月亮消灭你!', _utf8 '', _utf8 '', _utf8 '@', NOW())
Error 1452: Cannot add or update a child row: a foreign key constraint fails (`cookboo1_wanyuwang`.`juku_posts`, CONSTRAINT `juku_posts_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `juku_users` (`userid`) ON DELETE SET NULL)
the first QA site:
define('QA_MYSQL_TABLE_PREFIX', 'qa_');
define('QA_MYSQL_USERS_PREFIX', 'qa_');
define('QA_COOKIE_DOMAIN', '.damain.com');
the second QA site:
define('QA_MYSQL_TABLE_PREFIX', 'juku_');
define('QA_MYSQL_USERS_PREFIX', 'qa_');
define('QA_COOKIE_DOMAIN', '.damain.com');