View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05757Bug reportsSurvey takingpublic2012-03-14 21:08
Reporteruser11071Assigned Toc_schmitz  
PriorityurgentSeverityblock 
Status closedResolutionfixed 
Product Version2.00a1 
Fixed in Version2.00a2 
Summary05757: Table name typo
Description

There is an apostroph that leads to a crash

fixed with

$tkquery = "SELECT * FROM {{tokens_".$surveyid."}} WHERE token='".$token."' AND (completed = 'N' or completed='')";

Steps To Reproduce

Just filled out

Additional Information

Error executing query in dbExecuteAssoc: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 ''tokens'228225 WHERE token='4f27c698bb023' AND (completed = 'N' or completed=''' at line 1. The SQL statement executed was: SELECT * FROM lime'tokens_'228225 WHERE token='4f27c698bb023' AND (completed = 'N' or completed='')

TagsNo tags attached.
Attached Files
SurveyAction.php.diff (796 bytes)   
Index: controllers/SurveyAction.php
===================================================================
--- controllers/SurveyAction.php	(revision 12350)
+++ controllers/SurveyAction.php	(working copy)
@@ -427,7 +427,7 @@
             if ($thissurvey['alloweditaftercompletion'] == 'Y' ) {
                 $tkquery = "SELECT * FROM {{tokens_".$surveyid."}} WHERE token='".$token."'";
             } else {
-                $tkquery = "SELECT * FROM {{'tokens_'".$surveyid."}} WHERE token='".$token."' AND (completed = 'N' or completed='')";
+                $tkquery = "SELECT * FROM {{tokens_".$surveyid."}} WHERE token='".$token."' AND (completed = 'N' or completed='')";
             }
             $tkresult = dbExecuteAssoc($tkquery); //Checked
             $tokendata = $tkresult->read();
SurveyAction.php.diff (796 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)2
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & versionMysql
Server OS (if known)mac os x
Webserver software & version (if known)apache
PHP Version5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-02-05 11:23

administrator   ~17229

Hey Gurix,

how about you join the LimeSurvey team and we give you direct subversion access?

c_schmitz

c_schmitz

2012-02-05 11:24

administrator   ~17230

Fixed in rev 12352

user11071

2012-02-05 12:05

  ~17231

Why not, there are a lot of issues.

user11071

2012-02-05 12:15

  ~17232

My username on sf is gliderenator

c_schmitz

c_schmitz

2012-03-11 16:32

administrator   ~17859

2.00alpha 2 Build 120212 released

Related Changesets

LimeSurvey: Yii 34ca6489

2012-02-05 02:23:15

c_schmitz

Details Diff
Fixed issue 05757: Table name typo - patch by gurix

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12352 b72ed6b6-b9f8-46b5-92b4-906544132732
Affected Issues
05757
mod - application/controllers/SurveyAction.php Diff File

Issue History

Date Modified Username Field Change
2012-02-04 23:10 user11071 New Issue
2012-02-04 23:10 user11071 File Added: SurveyAction.php.diff
2012-02-05 11:23 c_schmitz Assigned To => c_schmitz
2012-02-05 11:23 c_schmitz Status new => assigned
2012-02-05 11:23 c_schmitz Note Added: 17229
2012-02-05 11:23 c_schmitz Status assigned => resolved
2012-02-05 11:23 c_schmitz Fixed in Version => 2.00a2
2012-02-05 11:23 c_schmitz Resolution open => fixed
2012-02-05 11:24 c_schmitz Note Added: 17230
2012-02-05 12:05 user11071 Note Added: 17231
2012-02-05 12:15 user11071 Note Added: 17232
2012-03-11 16:32 c_schmitz Note Added: 17859
2012-03-11 16:32 c_schmitz Status resolved => closed
2012-03-14 21:08 c_schmitz Changeset attached => Import 2012-03-09 13:30:34 Yii 34ca6489