fvanderstarre said in your previous thread about this (why did you open a new one?)
sid-valueXgid-value-Xqid-value, so for example you can have: 998853X2490X44648
So in the data table "lime_survey_998853"
you find this column.
sid=998853
gid=2490
qid=44648
Now you find in table "lime_questions" the question text "WHERE sid=998853 and qid=44648";
if parent_qid!=0 it is a question with subquestions and the parent_id contains the qid of your data table.
In the data table there is no "parent_qid". So that might be a bit tricky.
In "lime_answers" you find the answer options of single punch questions. query "WHERE qid=XXX AND code=[given_answer]"
Well, the rest is sql.
Maybe you try to ask this in a MySQL-forum how to combine this.
Regards
Joffm