View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 03520 | Bug reports | Survey taking | public | 2009-07-28 10:51 | 2009-08-03 09:22 |
| Reporter | stryker | Assigned To | c_schmitz | ||
| Priority | normal | Severity | block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.85+ | ||||
| Fixed in Version | 1.85+ | ||||
| Summary | 03520: MSSQL Syntax error | ||||
| Description | Activating surveys while using odbc_mssql driver causes the following error. [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'AND'.:SELECT g.gid,g.group_name,count(q.qid) as count from questions as q RIGHT JOIN groups as g ON q.gid=g.gid WHERE g.sid=22248 group by g.gid AND g.language='en' AND q.language='en'; | ||||
| Additional Information | Here is the fix for the error. Open admin/activate.php and scroll down to about line 63. You should see the following code. $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';"; Below is the fix for it. $groupquery = "SELECT g.gid,g.group_name,count(q.qid) as count from {$dbprefix}questions as q | ||||
| 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 | MS SQL Server 2005 | ||||
| Server OS (if known) | Windows Server 2003 | ||||
| Webserver software & version (if known) | Apache 2.0 | ||||
| PHP Version | PHP 5.2.9 | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-07-28 10:51 | stryker | New Issue | |
| 2009-07-28 10:51 | stryker | Status | new => assigned |
| 2009-07-28 10:51 | stryker | Assigned To | => user372 |
| 2009-07-28 10:51 | stryker | Database & DB-Version | => MS SQL Server 2005 |
| 2009-07-28 10:51 | stryker | Operating System (Server) | => Windows Server 2003 |
| 2009-07-28 10:51 | stryker | Webserver | => Apache 2.0 |
| 2009-07-28 10:51 | stryker | PHP Version | => PHP 5.2.9 |
| 2009-07-28 11:29 |
|
Relationship added | duplicate of 03494 |
| 2009-07-28 11:45 |
|
Assigned To | user372 => c_schmitz |
| 2009-07-31 07:18 |
|
Relationship added | duplicate of 03527 |
| 2009-07-31 14:41 | c_schmitz | Status | assigned => resolved |
| 2009-07-31 14:41 | c_schmitz | Fixed in Version | => 1.85+ |
| 2009-07-31 14:41 | c_schmitz | Resolution | open => fixed |
| 2009-08-03 09:22 | c_schmitz | Status | resolved => closed |
| 2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |