[SlugBug] MYSQL query help
Alan Dawson
aland at burngreave.net
Tue Sep 5 11:40:46 BST 2006
Hi,
I have a moodle installation that has had some problems during an upgrade, and
i'm trying to repair a table.
I have a query
SELECT mdl_question_answers.id,mdl_question_answers.question FROM
mdl_question_answers,mdl_question WHERE mdl_question.qtype='multichoice' AND
mdl_question_answers.question=mdl_question.id
which outputs like this.
39 11
40 11
41 11
42 11
43 11
54 37
55 37
56 37
57 37
58 38
59 38
60 38
61 38
62 39
63 39
64 39
65 39
..
but i want it like this
39,40,41,42,43 11
54,55,56,57 37
58,59,60,61 38
62,63,64,65 39
I can then use these lines to create some INSERT's into another table
anybody pass me some clue on this ?
cheers,
AED
--
"If you make decisions about software -- or anything -- based solely on
short-term cost and benefit, someone with a longer view can easily
manoeuver you into a trap from which it is hard to escape."
More information about the SlugBug
mailing list