error/moodle/error question answers missing in db
This error means that you have records in your mdl_question_answers table that no longer have a matching question in the mdl_question table. Here's a way to find them in MySQL (other databases may have a slightly different syntax):
SELECT mdl_question.id, mdl_question_answers.id, mdl_question_answers.question FROM mdl_question_answers
Left Join mdl_question ON mdl_question_answers.question = mdl_question.id
WHERE mdl_question.id IS NULL
I highly recommend that you make a copy of the mdl_question_answers table before you start deleting records.
Here's a way to delete those orphaned rows in the mdl_question_answers:
DELETE mdl_question_answers.* FROM mdl_question_answers LEFT JOIN mdl_question ON mdl_question_answers.question = mdl_question.id WHERE mdl_question.id IS NULL