| Anonymous | Login | 2013-05-18 15:22 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Repositories |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 04894 | Bug reports | [All Projects] Response browsing | public | 2011-01-22 08:47 | 2011-01-26 22:10 | ||||
| Reporter | starmonkey | ||||||||
| Assigned To | DenisChenu | ||||||||
| Priority | high | Severity | crash | ||||||
| Status | closed | Resolution | fixed | ||||||
| Product Version | 1.91RC2 | ||||||||
| Target Version | Fixed in Version | 1.91RC3 | |||||||
| Summary | 04894: Changing "display" to "Completed responses only" = SQL syntax error | ||||||||
| Description | As per the summary. Admin cannot proceed once this issue is triggered. | ||||||||
| Steps To Reproduce | 1) Go to browse a survey's responses 2) Change display to "completed responses only" 3) System fails with an SQL error that's not recoverable: Couldn't pull response data SELECT count(*) FROM `lime_survey_18513` submitdate IS NOT NULL 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 'IS NOT NULL' at line 1 | ||||||||
| Additional Information | I fixed it by adding a line to admin/browse.php: $sql_where = ""; if (incompleteAnsFilterstate() == "inc") { $sql_where .= "submitdate IS NULL"; } elseif (incompleteAnsFilterstate() == "filter") { $sql_where .= "submitdate IS NOT NULL"; } // SM 22Jan11: Fix to add WHERE clause if needed. if($sql_where != "") { $sql_where = "WHERE ".$sql_where; } //LETS COUNT THE DATA $dtquery = "SELECT count(*) FROM $sql_from $sql_where"; $dtresult=db_execute_num($dtquery) or safe_die("Couldn't pull response data {$dtquery} ".$connect->ErrorMsg()); I generally prefer generating sql in more robust methods, but that's my quick fix. | ||||||||
| I will donate to the project if issue is resolved within 48 hrs | No | ||||||||
| LimeSurvey build number | 191 | ||||||||
| Browser | Firefox, Chrome | ||||||||
| Database & DB-Version | MySQL5 | ||||||||
| Operating System (Server) | Ubuntu 10.04 | ||||||||
| Webserver software & version | Apache2 | ||||||||
| PHP Version | PHP5 | ||||||||
| Attached Files | |||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
starmonkey (reporter) 2011-01-22 09:12 |
Note the build is Version 1.91RC2 Build 9672 (latest download) |
|
DenisChenu (developer) 2011-01-22 19:01 |
Thanks ! Fixed with: if ($sql_where!="") { $dtquery .=" WHERE $sql_where"; } :) http://limesurvey.svn.sourceforge.net/viewvc/limesurvey?view=revision&revision=9711 [^] |
|
c_schmitz (administrator) 2011-01-26 22:10 |
Released. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-01-22 08:47 | starmonkey | New Issue | |
| 2011-01-22 09:12 | starmonkey | Note Added: 13954 | |
| 2011-01-22 18:55 | DenisChenu | Assigned To | => DenisChenu |
| 2011-01-22 18:55 | DenisChenu | Status | new => assigned |
| 2011-01-22 18:58 | DenisChenu | Note Added: 13956 | |
| 2011-01-22 18:58 | DenisChenu | Status | assigned => resolved |
| 2011-01-22 18:58 | DenisChenu | Fixed in Version | => 1.91RC3 |
| 2011-01-22 18:58 | DenisChenu | Resolution | open => fixed |
| 2011-01-22 19:01 | DenisChenu | Note Deleted: 13956 | |
| 2011-01-22 19:01 | DenisChenu | Note Added: 13957 | |
| 2011-01-26 22:10 | c_schmitz | Note Added: 13968 | |
| 2011-01-26 22:10 | c_schmitz | Status | resolved => closed |
| 2011-03-01 11:58 | DenisChenu | Relationship added | related to 04929 |
| Copyright © 2000 - 2013 MantisBT Team |