Forums / Setup & design / Query error: You have an error in your SQL syntax

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

eZ debug

Timing: Jan 18 2025 16:04:55
Script start
Timing: Jan 18 2025 16:04:55
Module start 'content'
Timing: Jan 18 2025 16:04:55
Module end 'content'
Timing: Jan 18 2025 16:04:56
Script end

Main resources:

Total runtime0.9537 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2891180.8125
Module start 'content' 0.00550.8113 770.1016583.4844
Module end 'content' 0.81680.1368 1,353.5859332.7422
Script end 0.9536  1,686.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4190210.0002
Check MTime0.00140.1512210.0001
Mysql Total
Database connection0.00060.064610.0006
Mysqli_queries0.885792.86921960.0045
Looping result0.00190.20241940.0000
Template Total0.921596.620.4608
Template load0.00210.223620.0011
Template processing0.919496.404920.4597
Template load and register function0.00020.016010.0002
states
state_id_array0.00070.071710.0007
state_identifier_array0.00090.094620.0005
Override
Cache load0.00170.1818340.0001
Sytem overhead
Fetch class attribute can translate value0.00120.123540.0003
Fetch class attribute name0.00100.107950.0002
XML
Image XML parsing0.00140.146140.0003
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00260.2685330.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs