View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
07335Bug reportsImport/Exportpublic2013-03-05 08:45
ReporterAdrax Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary07335: SQL error (column ID ambiguous) when exporting a partial answer
Description

Trying to export a single answer to PDF raises this error:

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous

Additional Information

The ID field in the WHERE clause has no table prefix, causing this problem.

Complete SQL executed:

SELECT submitdate, lastpage, startlanguage, startdate, datestamp, ipaddr, refurl, 19334X1X1, 19334X1X1other, 19334X1X2, 19334X1X2other, 19334X1X44, 19334X1X43, 19334X1X45SQ001, 19334X1X45SQ001comment, 19334X1X45SQ002, 19334X1X45SQ002comment, 19334X1X45SQ003, 19334X1X45SQ003comment, 19334X1X45other, 19334X1X45othercomment, 19334X2X3SQ001, 19334X2X3SQ003, 19334X2X3SQ004, 19334X2X3SQ005, 19334X2X3SQ006, 19334X2X3SQ007, 19334X2X3SQ009, 19334X2X3SQ008, 19334X2X3SQ010, 19334X2X3other, 19334X2X104SQ001, 19334X2X104SQ002, 19334X2X104SQ003, 19334X2X108, 19334X2X7SQ001, 19334X2X7SQ002, 19334X2X7SQ003, 19334X2X7SQ004, 19334X2X7SQ005, 19334X2X7SQ006, 19334X2X7SQ007, 19334X2X7SQ008, 19334X2X7SQ009, 19334X2X7other, 19334X2X14SQ002, 19334X2X14SQ003, 19334X2X14SQ005, 19334X2X14other, 19334X2X56SQ001, 19334X2X56SQ002, 19334X2X56SQ003, 19334X2X56SQ004, 19334X2X56SQ005, 19334X2X56other, 19334X2X83, 19334X5X86, 19334X5X86comment, 19334X5X87SQ001, 19334X5X87SQ002, 19334X5X87SQ003, 19334X5X87SQ004, 19334X5X87SQ005, 19334X5X87SQ006, 19334X5X87SQ007, 19334X5X87SQ008, 19334X5X87SQ009, 19334X5X87SQ010, 19334X5X93, 19334X5X94, 19334X5X95, 19334X5X96, 19334X5X97, 19334X5X98, 19334X4X711, 19334X4X712, 19334X4X713, 19334X4X714, 19334X4X715, 19334X4X716, 19334X4X717, 19334X4X718, 19334X4X719, 19334X4X49, 19334X4X7110, tid, firstname, lastname, email, emailstatus, language, sent, remindersent, remindercount, completed, usesleft, validfrom, validuntil, mpid, participant_id, blacklisted, lime_survey_19334.token, interviewtime, 19334X1time, 19334X1X1time, 19334X1X2time, 19334X1X44time, 19334X1X43time, 19334X1X45time, 19334X2time, 19334X2X3time, 19334X2X104time, 19334X2X108time, 19334X2X7time, 19334X2X14time, 19334X2X56time, 19334X2X83time, 19334X5time, 19334X5X86time, 19334X5X87time, 19334X5X93time, 19334X5X94time, 19334X5X95time, 19334X5X96time, 19334X5X97time, 19334X5X98time, 19334X4time, 19334X4X71time, 19334X4X49time, lime_survey_19334.id
FROM lime_survey_19334
LEFT JOIN lime_tokens_19334 tokentable ON tokentable.token=lime_survey_19334.token
LEFT JOIN lime_survey_19334_timings survey_timings ON lime_survey_19334.id = survey_timings.id
WHERE id=196
ORDER BY lime_survey_19334.id LIMIT 100

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)130213
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5
Server OS (if known)CentOS 6
Webserver software & version (if known)Cherokee
PHP Version5.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2013-03-02 16:24

administrator   ~24468

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

c_schmitz

c_schmitz

2013-03-05 08:45

administrator   ~24540

2.00+ Build 130305 released.

Related Changesets

LimeSurvey: master 0d88e929

2013-03-02 15:17:03

c_schmitz

Details Diff
Fixed issue 07335: SQL error (column ID ambiguous) when exporting a single response Affected Issues
07335
mod - application/controllers/admin/export.php Diff File

Issue History

Date Modified Username Field Change
2013-02-26 13:37 Adrax New Issue
2013-03-02 16:16 c_schmitz Assigned To => c_schmitz
2013-03-02 16:16 c_schmitz Status new => assigned
2013-03-02 16:17 c_schmitz Status assigned => resolved
2013-03-02 16:17 c_schmitz Fixed in Version => 2.00+
2013-03-02 16:17 c_schmitz Resolution open => fixed
2013-03-02 16:24 c_schmitz Changeset attached => LimeSurvey master 0d88e929
2013-03-02 16:24 c_schmitz Note Added: 24468
2013-03-05 08:45 c_schmitz Note Added: 24540
2013-03-05 08:45 c_schmitz Status resolved => closed