Useful SQL Queries?

Re: Useful SQL Queries?

by Cristina Fierbinteanu -
Number of replies: 2
Thanks again for pointing out it depends on the Moodle version. In 2.5.9,  the following statement worked for me:

UPDATE  mdl_question_multichoice
SET answernumbering = 'none'
WHERE question IN
    (SELECT id FROM mdl_question
     WHERE category = 7);


In reply to Cristina Fierbinteanu

Re: Useful SQL Queries?

by Miki Alliel -
Picture of Translators

I'm just updating that in moodle 2.9 + the  'mdl_question_multichoice' table  is no more exist and not the table is

mdl_qtype_multichoice_options

the sql should be :

UPDATE  mdl_qtype_multichoice_options

SET answernumbering = 'none'

 WHERE questionid IN (SELECT id FROM mdl_questionWHERE category = 7);