View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06838Bug reportsRemoteControlpublic2012-11-15 16:27
Reporterjweberhofer Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06838: export_responses gives a SQLSTATE[42000]
Description

rpcClient->export_responses( zavbtzpautzd4psezkbnnegrn7g86dk6, 712485, 'csv', 'de', 'all', 'full', 'long', 5, 5)

Always returns in the following exception:
Request error: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'return\nORDER BY lime_survey_712485.id LIMIT 1 OFFSET 4' at line 5

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)121106
I will donate to the project if issue is resolvedNo
BrowserFirefox 16
Database type & versionMySQL 5.5.25
Server OS (if known)opensuse 12.1
Webserver software & version (if known)Apache/2.2.21
PHP Version5.3.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-11-08 09:50

administrator   ~22005

Can you set debug mode to 2 in application/config/config.php and see if you get a more detailed error message?

jweberhofer

jweberhofer

2012-11-08 14:38

reporter   ~22016

Thank you for the debug-hint. Following your response I see that the following statement is executed; it's the "WHERE" line that is wrong. Executing the statement without that line runs smoothly!

SELECT *
FROM lime_survey_712485
LEFT JOIN lime_tokens_712485 ON lime_tokens_712485.token=lime_survey_712485.token
LEFT JOIN lime_survey_712485_timings survey_timings ON lime_survey_712485.id = survey_timings.id
WHERE return
ORDER BY lime_survey_712485.id LIMIT 1

c_schmitz

c_schmitz

2012-11-08 14:43

administrator   ~22018

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10193

jweberhofer

jweberhofer

2012-11-08 23:13

reporter   ~22030

Wow, you are really fast. I've corrected that, and is looks good, but:

Another problem occures when I set an offset, in my case, I'll start with record four. The correct syntax would be "LIMIT 4" instead of "OFFSET 4"

=======
SELECT *
FROM lime_survey_712485
LEFT JOIN lime_tokens_712485 ON lime_tokens_712485.token=lime_survey_712485.token
LEFT JOIN lime_survey_712485_timings survey_timings ON lime_survey_712485.id = survey_timings.id ORDER BY lime_survey_712485.id OFFSET 4;

=======
Some notes/questions:

When I try to limit the result to one line, that second parameter will be completely ignored in the SQL-Statement, but that might be handled within code, too. I can't see a handling in the completion state within the SQL statement.

Is there a way to load exactly a specific token's result, too?

c_schmitz

c_schmitz

2012-11-08 23:19

administrator   ~22032

if you want to start with record 4 then OFFSET 4 is the right statement?

c_schmitz

c_schmitz

2012-11-09 00:07

administrator   ~22036

Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10212

Related Changesets

LimeSurvey: master 7bb8660c

2012-11-08 14:43

c_schmitz


Details Diff
Fixed issue 06838: RemoteControl export_responses returns an error Affected Issues
06838
mod - application/controllers/admin/remotecontrol.php Diff File

LimeSurvey: 2.1 bb2b2baa

2012-11-09 00:05

c_schmitz


Details Diff
Fixed issue 06838: RemoteControl export_responses returns an error Affected Issues
06838
mod - application/controllers/admin/remotecontrol.php Diff File

Issue History

Date Modified Username Field Change
2012-11-07 17:08 jweberhofer New Issue
2012-11-08 09:50 c_schmitz Note Added: 22005
2012-11-08 09:50 c_schmitz Assigned To => c_schmitz
2012-11-08 09:50 c_schmitz Status new => feedback
2012-11-08 14:38 jweberhofer Note Added: 22016
2012-11-08 14:38 jweberhofer Status feedback => assigned
2012-11-08 14:43 c_schmitz Changeset attached => LimeSurvey master 7bb8660c
2012-11-08 14:43 c_schmitz Note Added: 22018
2012-11-08 14:43 c_schmitz Resolution open => fixed
2012-11-08 14:43 c_schmitz Status assigned => resolved
2012-11-08 14:43 c_schmitz Fixed in Version => 2.00+
2012-11-08 23:13 jweberhofer Note Added: 22030
2012-11-08 23:14 jweberhofer Status resolved => feedback
2012-11-08 23:14 jweberhofer Resolution fixed => reopened
2012-11-08 23:19 c_schmitz Note Added: 22032
2012-11-09 00:07 c_schmitz Changeset attached => LimeSurvey 2.1 bb2b2baa
2012-11-09 00:07 c_schmitz Note Added: 22036
2012-11-15 16:27 c_schmitz Status feedback => closed
2012-11-15 16:27 c_schmitz Resolution reopened => fixed