Welcome, Guest
Username: Password: Remember me

TOPIC: Mapping between question codes and question headings

Mapping between question codes and question headings 2 years 5 months ago #79936

  • rstec
  • rstec's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hello! ;)

The question I have is this one: I need to map the question codes with the question headings, for example in the survey_89541 I have one column with this heading: [89541X1X34] and I need to map it with the full question, that in this example would be: Where were you born? so the map would be [89541X1X34] => Where were you born?

I need the database query in order to do this ==> select * from survey_89541 inner join ....... (this is what I don't know) :unsure:

I know that when you export the results you can change between question codes, abbreviated questions, full headings and export it to CSV, Excel, etc. But I need to work directly from the database, this because I am using a report tool, and in order to define the reports, I need to specify the database query on which this report will work on.

I know limesurvey does it in the file exportresults.php but I couldn't find how, any help will be fully apreciated. :)

Thank you!
The administrator has disabled public write access.

Re: Mapping between question codes and question headings 2 years 5 months ago #79952

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5351
  • Thank you received: 299
  • Karma: 250
Have a look at the createfieldmap function. If you let Limesurvey create the fieldmap, the related array should contain all information you are looking for.
For more complex surveys this is a far easier approach then querying all the data manually.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.110 seconds
Donation Image