You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version...

kash597 - June 18, 2009 - 03:49
Project:Topic Hubs
Version:6.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've got a couple of following error when implemented topic hubs and tried to use it on my site :

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(node.nid), node.title AS node_title, node.type AS node_type, n' at line 1 query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node.title AS node_title, node.type AS node_type, node_comment_statistics.comment_count AS node_comment_statistics_comment_count FROM node node INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid LEFT JOIN term_node term_node ON node.vid = term_node.vid WHERE (node.status <> 0 OR (node.uid = 1 AND 1 <> 0) OR 1 = 1) AND (node_comment_statistics.comment_count >= 1) AND (node.type in ('story')) AND (((term_node.tid = 43))) ORDER BY node_comment_statistics_comment_count DESC ) count_alias in /home/parsteck/public_html/dearmypresident/profiles/prosepoint/modules/views/includes/view.inc on line 729.

I get these errors after where i add a condition to a spesific topic.
Any help is greatly appreciated.

Kash.

#1

febbraro - June 18, 2009 - 11:06

What version of views are you using?

#2

kash597 - June 18, 2009 - 18:35

views 6.x-2.6

#3

febbraro - June 22, 2009 - 12:22

Hey, sorry for the delay. This is a known issue with Views that effects queries that use DISTINCT.

There is this issue #284392: db_rewrite_sql causing issues with DISTINCT and I will monitor it.

Might need to patch to OP version of views to fix this. If you get somethign working please report back and we will try to work it into a release.

 
 

Drupal is a registered trademark of Dries Buytaert.