no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tech:others:limesurvey_notes [2014/11/15 15:13] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Notes on LimeSurvey ====== | ||
| + | ===== Table Structure ===== | ||
| + | ==== Tables with Survey Id - sid column name ==== | ||
| + | ^Column Name^Position^ | ||
| + | |lr_surveys|1| | ||
| + | |lr_survey_permissions|1| | ||
| + | |lr_assessments|2| | ||
| + | |lr_groups|2| | ||
| + | |lr_quota|2| | ||
| + | |lr_quota_members|2| | ||
| + | |lr_saved_control|2| | ||
| + | |lr_questions|3| | ||
| + | |||
| + | ==== Tables with Question Id - qid column name ==== | ||
| + | ^Column Name^Position^ | ||
| + | |lr_questions|1| | ||
| + | |lr_defaultvalues|1| | ||
| + | |lr_answers|1| | ||
| + | |lr_conditions|2| | ||
| + | |lr_question_attributes|2| | ||
| + | |lr_quota_members|3| | ||
| + | |||
| + | |||
| + | ==== Tables with Group Id - gid column name ==== | ||
| + | ^Column Name^Position^ | ||
| + | |lr_groups|1| | ||
| + | |lr_assessments|4| | ||
| + | |lr_questions|4| | ||
| + | |||
| + | ===== SQLs used to get Table Structure ===== | ||
| + | <code sql> | ||
| + | SELECT * FROM `COLUMNS` WHERE `TABLE_SCHEMA` = ' | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | SELECT concat(' | ||
| + | WHERE `TABLE_SCHEMA` = ' | ||
| + | order by COLUMN_KEY desc, ORDINAL_POSITION, | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | SELECT concat(' | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | select group_name, question, code, answer | ||
| + | from | ||
| + | lr_groups, lr_questions, | ||
| + | where | ||
| + | lr_groups.gid = lr_questions.gid | ||
| + | and | ||
| + | lr_answers.qid = lr_questions.qid | ||
| + | and | ||
| + | lr_questions.sid = 88593 | ||
| + | order by group_order, | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | select group_name, question | ||
| + | from | ||
| + | lr_groups, lr_questions | ||
| + | where | ||
| + | lr_groups.gid = lr_questions.gid | ||
| + | and | ||
| + | lr_questions.sid = 88593 | ||
| + | order by group_order, | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | </ | ||
| + | |||
| + | <code sql> | ||
| + | </ | ||
| + | |||