Query error: You have an error in your SQL syntax

Author Message

Will Collins

Tuesday 25 April 2006 3:26:56 pm

Recently I have been getting this error when posting a comment to an article on my site:

Fatal error: A database transaction in eZ publish failed.

The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-d8b7bc8b63e35f29dd408b94d9a62cfc and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.

If I look in the error logs, I find the following:

[ Apr 25 2006 14:53:56 ] [207.46.98.128] Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f$

and (ezcontentobject.id <> 9226)

and ((coverdate.contentclassattrib' at line 6. Query: SELECT COUNT(ezcontentobject.id) AS id_count, ezcontentobject.$

FROM ezcontentobject_attribute coverdate

INNER JOIN ezcontentobject ON (coverdate.contentobject_id = ezcontentobject.id) AND (coverdate.version = ezcontentob$

INNER JOIN ezcontentobject_link ON (ezcontentobject.id = ezcontentobject_link.from_contentobject_id) AND (ezcontento$

WHERE ((ezcontentobject_link.enhanced_contentclassattribute_id = 270)

and (ezcontentobject_link.to_contentobject_id IN ())

and (ezcontentobject.id <> 9226)

and ((coverdate.contentclassattribute_id = 183) and (coverdate.data_int < 1145991236))

and (ezcontentobject.published > 0))

GROUP BY ezcontentobject.id

ORDER BY id_count DESC, coverdate.data_int DESC LIMIT 5

(sorry about the spacing). Anyone have an idea why this query would fail?

Xavier Dutoit

Wednesday 26 April 2006 1:22:09 am

Hard to read the query as pasted.

I'd suggest to copy paste it and run it in your the shell from mysql> . Usually the error message is more explicit

X+

http://www.sydesy.com

Bertrand Dunogier

Wednesday 26 April 2006 1:24:02 am

Except the $ at the end of some lines, which I suppose are pasting mistakes, I can see this part wrong :

and (ezcontentobject_link.to_contentobject_id IN ())

IN() should not be empty

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.