Fatal SQL Error
| Project: | Workspace |
| Version: | 4.5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Frank Ralf |
| Status: | won't fix |
Through multiple versions, I've never been able to get this module to work.
With current release, I get the following error:
Fatal error: You have an error in your SQL syntax near 'UNION SELECT c.nid AS cnid, '' AS type, c.cid, c.subject, c.status, c.timestamp,' at line 1 query: SELECT n.nid, n.type, 0 AS cid, n.title, n.status, n.changed, s.comment_count, 1 AS node FROM node n, node_comment_statistics s WHERE n.uid = 1 AND n.nid = s.nid UNION SELECT c.nid AS cnid, '' AS type, c.cid, c.subject, c.status, c.timestamp, c.pid, 0 FROM comments AS c WHERE c.uid = 1 ORDER BY changed ASC LIMIT 0, 50 in /home/vrealms/public_html/beta/includes/database.mysql.inc on line 125
As I am using table prefixes I assumed that workspace.module was not respecting this, which is certainly the case in places but, I was unable to fix it myself.

#1
I am getting this as well, on a new install (solaris). But, I have it running fine for another site of mine.
I think maybe it is a problem with another module I installed... so I am removing them and will try to weed out the issue.
#2
not caused by any other module.
am thinking now it may be a mysql version issue.
my problem site uses MySQL 3.23.53
my working site uses MySQL v 4.0.20
#3
The workspace module is not compatible with MySQL 3 because it uses a UNION statement, which MySQL 3 does not support. There are ways to simulate a UNION statement in MySQL 3 but I do not (nor do I plan to) use MySQL 3, so I will not be coding this.
I have just checked in a version that tries to be table prefix friendly.
#4
As per this thread: http://drupal.org/node/16797
I've taken the suggestions and created a simple patch file - please realise that this DOES alter the functionality very very slightly.
It also needs to be checked - i'm not 100% sure if it works well :)
#5
Pertains to an outdated version. Please create new issue if problem persists.
TIA
Frank