Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
423 views
in Q2A Core by
Ran into this problem:

TRUNCATE  `qa_words`

MySQL said: Documentation

#1701 - Cannot truncate a table referenced in a foreign key constraint (`mydatabase`.`qa_posttags`, CONSTRAINT `qa_posttags_ibfk_2` FOREIGN KEY (`wordid`) REFERENCES `mydatabase`.`qa_words` (`wordid`))
Q2A version: 1.7.4

1 Answer

0 votes
by
Sounds cheap, but I just used:

DELETE FROM `qa_words`
by
qa_words being  one of the core table which links tags, category names, hence mysql throws an error for foreign key constraints. you can set foreign key constraints to zero and then run truncate. That should do.
...