Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Displaying database data in a survey

More
2 years 11 months ago #232565 by Pap123
Please help us help you and fill where relevant:
Your LimeSurvey version:   3.17.8+190722
Own server or LimeSurvey hosting: own server
Survey theme/template: default
==================
Hi, I would like to know if it is possible to add a query for example php to display from a database over a question.
I would like to use a simple SELECT to communicate the highest and lowest value from the database table to the user filling out the survey.

Thanks

Please Log in to join the conversation.

More
2 years 11 months ago #232566 by tpartner
You can't use PHP within LimeSurvey. I suggest an AJAX call to an external PHP file that queries the database, either directly or via the API.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
More
2 years 10 months ago - 2 years 10 months ago #232724 by davebostockgmail
This may help you .. I used it to query the database and return data into the survey but as Tony says it uses PHP called via Ajax to do it.

[url] forums.limesurvey.org/forum/can-i-do-thi...er-all-needed-solved [/url]
Last edit: 2 years 10 months ago by davebostockgmail. Reason: Added link

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose