Home Support Forums
Re:SQL Field names (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Re:SQL Field names
|
Jean91 (User)
Junior Lime
Posts: 23
|
|
SQL Field names 3 Months ago
|
Karma: 0
|
|
Hello,
I lately unactivated and deleted a survey before exporting all answers.
Trying to reload it and activate it (from a backup), I cannot retrieve lost answers (sometimes, limesurvey offers that).
But looking in SQL data base with phpMyAdmin, I am able to see the answers and to export it.
Unfortunately, data fields have different names and are not in the same order than in a csv file directly exported from a survey.
Question 1: Is there a way to force a survey to retrieve answer data still in data base, this survey being one imported backup of a deleted survey.
Question 2: Is there a way to establish a relationship between answers field names in sql database et limesurvey question text and (or) labels.
Note: "lost data" is also in SQL dump.
Thanks for your attention
Jean
|
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
Jean91 (User)
Junior Lime
Posts: 23
|
|
Re:SQL Field names 3 Months ago
|
Karma: 0
|
|
Sorry but I forgot:
LimeSurvey is 1.71 build 5048
Jean
|
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
|
Re:SQL Field names 3 Months ago
|
Karma: 6
|
|
If you can re-import the survey structure exactly as it was before, then activate the survey, you will more than likely get an exact replica of the database structure. If the numbers are changed, then at least the order of the saved fields will be the same. It's a bit complicated, but in general, the field names are comprised of the Survey ID. So, a question from SurveyID 1000, GroupID 50 and QuestionID 23 will look like "1000X50X23".
It will take a bit of mucking around, but if no new questions have been created you should, with some trial and error, be able to massage your old data into the new cell.
Jason
|
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
Jean91 (User)
Junior Lime
Posts: 23
|
|
Re:SQL Field names 3 Months ago
|
Karma: 0
|
|
Hello Jason,
I succeeded in reloading old answers database but unfortunately, most of the fields were displayed as blank.
I suspect a mismatch between old a new structure.
Following your advice, I'll try to match questions numbers and data base columns.
Thanks for your help
Jean
|
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
|
|