Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Querying a specific response.

Hi,

So this is in relation to another question I've asked before, linked to below:

https://sawtoothsoftware.com/forum/25625/prepopulate-answers-questions-respondents-previous-records

I'd like to query the question answers from specific questions using Perl and SQL.  We know the respondent number of the specific respondents we'd like to find the data for.  

So far I've been referring to the documentation below to do this,

https://www.sawtoothsoftware.com/index.php?option=com_content&view=article&id=1376

using the code at the bottom of the page as a test to see if everything works.  The only thing that I've changed is the database information to match what I'm using for my survey.  However, I keep getting "Sawtooth Error # 132" when I try to test my survey.  If anyone has any experience with this and has some updated code, I'd appreciate this.  

Thanks!
asked Jun 10 by Q (365 points)
Error 132 is a generic error that shows up when something goes wrong in unverified Perl; more information about what when wrong can be found in the admin module.  Does something there provide some further insight?
Yes, in the admin module survey log, it says "There is an error in Lighthouse Studio Scripting: Script: " then it displays the sample code I had used, and underneath that it says

System Error:
Connection Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Another member of the Sawtooth Software team suggested that that may come from an incorrectly specified database host.  Could you double-check that that configuration is exactly what you would expect it to be?  If you are hosting with us, the hosting portal should have the correct values.
Thanks Zachary, that's exactly what the problem was.  The database host wasn't configured correctly.   I appreciate the help!

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...