Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1

THEMA: Return Data from External Database

Return Data from External Database 4 Monate 2 Wochen her #92080

  • thomsol
  • thomsols Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
I want to have a lookup against an external database to retrieve information based on a survey response. For example: user enters vehicle identification #, I want to look up the make, model, year, etc.

The way I'm attempting to do this is by adding a function to the em_core_helper.php module, which contains the logic to connect to the database, then look up the information.

Question, can the return from this function be a name->value pair, such that I could reference it as {car_id(qCarId.shown)["Model"]} or [car_id[CarId.shown)->Model?

Open to ideas of another way to do this....

(This question was moved from installation category)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Return Data from External Database 4 Monate 2 Wochen her #92086

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 2937
  • Dank erhalten: 446
  • Karma: 253
Rather than modifying the core code, it may be easier/safer to make an AJAX call to a remote script that accesses the "cars" DB for you.

Alternatively, here's an example of how to access data from a remote CSV file - www.limesurvey.org/en/forum/design-issue...filled-questions-csv
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Return Data from External Database 4 Monate 2 Wochen her #92091

  • thomsol
  • thomsols Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Ajax... ugh!! (sorry, not my skillset)... Any chance this will be handled with the plug-ins due in 2.1?
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
Moderatoren: DenisChenu, ITEd
Ladezeit der Seite: 0.167 Sekunden
Donation Image