View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
03583 | Bug reports | Installation | public | 2009-08-18 17:03 | 2009-08-19 00:55 |
Reporter | Assigned To | ||||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | duplicate | ||
Product Version | 1.85+ | ||||
Summary | 03583: SQL error when activating a survey | ||||
Description | The syntax of the SQL command was wrong - the Group By clause should be last. The part after that belongs to the Where clause. Also, you need to specify an aggregate function in you select if you are using Group By. In the activate.php script, I changed the line $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';"; to $groupquery = "SELECT min(g.gid),min(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 ;"; This worked and I could activate the survey. | ||||
Tags | No tags attached. | ||||
Bug heat | 0 | ||||
Complete LimeSurvey version number (& build) | |||||
I will donate to the project if issue is resolved | |||||
Browser | |||||
Database type & version | SQL Server 2005 | ||||
Server OS (if known) | Windows Server 2003 | ||||
Webserver software & version (if known) | IIS 6 | ||||
PHP Version | 5.3.0 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2009-08-18 17:03 |
|
New Issue | |
2009-08-18 17:03 |
|
Status | new => assigned |
2009-08-18 17:03 |
|
Assigned To | => user372 |
2009-08-18 17:03 |
|
Database & DB-Version | => SQL Server 2005 |
2009-08-18 17:03 |
|
Operating System (Server) | => Windows Server 2003 |
2009-08-18 17:03 |
|
Webserver | => IIS 6 |
2009-08-18 17:03 |
|
PHP Version | => 5.3.0 |
2009-08-19 00:55 | c_schmitz | Status | assigned => closed |
2009-08-19 00:55 | c_schmitz | Resolution | open => duplicate |
2009-08-19 00:55 | c_schmitz | Relationship added | duplicate of 03494 |