LimeSurvey bugs, patches and feature requests - Bug reports |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 06838 | Bug reports | [All Projects] RemoteControl | public | 2012-11-07 17:08 | 2012-11-15 16:27 |
|
| Reporter | jweberhofer | |
| Assigned To | c_schmitz | |
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | |
| Platform | | OS | | OS Version | |
| Product Version | 2.00+ | |
| Target Version | | Fixed in Version | 2.00+ | |
| I will donate to the project if issue is resolved within 48 hrs | No |
| LimeSurvey build number | 121106 |
| Browser | Firefox 16 |
| Database & DB-Version | MySQL 5.5.25 |
| Operating System (Server) | opensuse 12.1 |
| Webserver software & version | Apache/2.2.21 |
| PHP Version | 5.3.8 |
|
| Summary | 06838: 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 |
| Steps To Reproduce | |
| Additional Information | |
| Tags | No tags attached. |
| Relationships | |
| Attached Files | |
|
| 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 | Note Added: 22031 | |
| 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 Deleted: 22031 | |
| 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 |
|
Notes |
|
|
|
|
Can you set debug mode to 2 in application/config/config.php and see if you get a more detailed error message? |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
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? |
|
|
|
|
|
if you want to start with record 4 then OFFSET 4 is the right statement? |
|
|
|
|
|