View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 03527 | Bug reports | Survey taking | public | 2009-07-31 03:30 | 2009-07-31 07:18 | 
| Reporter | Assigned To | kadejo | |||
| Priority | high | Severity | partial_block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.85+ | ||||
| Fixed in Version | 1.85+ | ||||
| Summary | 03527: Due to SQL bad syntax, survey can not be activated at all under PostgreSQL (any version) | ||||
| Description | The problem is located at admin/activate.php, line 63: $groupquery = "SELECT g.gid,g.group_name,count(q.qid) as count from {$dbprefix}questions as q RIGHT JOIN {$dbprefix}groups as g ON q.gid=g.gid WHERE g.sid=$postsid group by g.gid AND g.language='$baselang' AND q.language='$baselang';"; As you can see, there is a condition, AND g.language='$baselang' AND q.language='$baselang' after group by clause, what it is not very sql compliant :-p. I saw that MySQL doesn't have any problem with that, but PostgreSQL just can't execute the sentence, so just reescribing the sentence is enough to solve the bug, just this way: $groupquery = "SELECT g.gid,g.group_name,count(q.qid) as count from {$dbprefix}questions as q RIGHT JOIN {$dbprefix}groups as g ON q.gid=g.gid WHERE g.sid=$postsid AND g.language='$baselang' AND q.language='$baselang' group by g.gid;"; I'm telling my friend kadejo if this can be uploaded, in fact I can make all PostgreSQL tests because I use limesurvey with that DBMS at work... could I?  | ||||
| Tags | No tags attached. | ||||
| Bug heat | 10 | ||||
| Complete LimeSurvey version number (& build) | 1.85 | ||||
| I will donate to the project if issue is resolved | |||||
| Browser | any | ||||
| Database type & version | PostgreSQL any version (tested under 8.2 and 8.3) | ||||
| Server OS (if known) | GNU/Linux | ||||
| Webserver software & version (if known) | Apache2 | ||||
| PHP Version | 5.2 | ||||
| 
	 Also, it is needed to include g.group_name under group by clause, so line 63 would be:  | 
|
| 
	 Thank you Patricia! Your fix works great. I think that nowadays there is nobody testing LimeSurvey thoroughly on PostgreSQL, so if you can work on this, everybody will be very happy!. I am going to ask that on limesurvey-developers.  | 
|
| 
	 Fix kindly given by Patricia Araya, see note 8991.  | 
|
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2009-07-31 03:30 | 
					 | 
				New Issue | |
| 2009-07-31 03:30 | 
					 | 
				Status | new => assigned | 
| 2009-07-31 03:30 | 
					 | 
				Assigned To | => user372 | 
| 2009-07-31 03:30 | 
					 | 
				Build Number | => 1.85 | 
| 2009-07-31 03:30 | 
					 | 
				Browser | => any | 
| 2009-07-31 03:30 | 
					 | 
				Database & DB-Version | => PostgreSQL any version (tested under 8.2 and 8.3) | 
| 2009-07-31 03:30 | 
					 | 
				Operating System (Server) | => GNU/Linux | 
| 2009-07-31 03:30 | 
					 | 
				Webserver | => Apache2 | 
| 2009-07-31 03:30 | 
					 | 
				PHP Version | => 5.2 | 
| 2009-07-31 03:32 | kadejo | Assigned To | user372 => kadejo | 
| 2009-07-31 03:32 | kadejo | Priority | normal => high | 
| 2009-07-31 03:42 | 
					 | 
				Note Added: 08991 | |
| 2009-07-31 07:06 | kadejo | Note Added: 08992 | |
| 2009-07-31 07:06 | kadejo | Status | assigned => resolved | 
| 2009-07-31 07:08 | kadejo | Note Added: 08993 | |
| 2009-07-31 07:08 | kadejo | Status | resolved => closed | 
| 2009-07-31 07:08 | kadejo | Resolution | open => fixed | 
| 2009-07-31 07:08 | kadejo | Fixed in Version | => 1.85+ | 
| 2009-07-31 07:18 | 
					 | 
				Relationship added | has duplicate 03520 | 
| 2009-07-31 07:18 | 
					 | 
				Relationship added | duplicate of 03494 | 
| 2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |