Project Issues - Statistics: "You have an error in your SQL syntax"
| Project: | Project issue tracking |
| Version: | 5.x-2.2 |
| Component: | Issues |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
user warning: 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 'DISTINCT(n.nid), pn.title, COUNT(n.nid) AS total FROM node n INNER JOIN project_' at line 1 query: SELECT p DISTINCT(n.nid), pn.title, COUNT(n.nid) AS total FROM node n INNER JOIN project_issues p ON n.nid = p.nid INNER JOIN node pn ON p.pid = pn.nid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 5 AND na.realm = 'og_subscriber') OR (na.gid = 2 AND na.realm = 'og_subscriber'))) AND ( n.status = 1 AND pn.status = 1 AND p.sid = 1 ) GROUP BY pn.nid, pn.title ORDER BY total DESC LIMIT 0, 15 in /var/www/html/projects/public_html/includes/database.mysql.inc on line 172.
Happens each time a user (or admin) goes to the projects/issues/statistics page. No other Projects module pages seem affected.
Running Drupal 5.8 with PHP 5.2.6 & MySQL 5.0.51a

#1
This sounds like a duplicate of #172035: Error getting statistics on project issues. Please take a look at that issue for further information. This error is caused by a core bug, and #172035: Error getting statistics on project issues has a link to that issue. Please review that core issue and patch, because this problem will continue unless people review the patches and help get them committed.