We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

EE 2 - PHP / MySQL upgrade - MySQL said: #1064 - You have an error in your SQL syntax

Development and Programming

snowcrash's avatar
snowcrash
3 posts
9 years ago
snowcrash's avatar snowcrash

I’ve recently got this MySQL error:

Error SQL query:
SELECT t.entry_id FROM db_channel_titles AS t LEFT JOIN db_channels ON t.channel_id = db_channels.channel_id LEFT JOIN db_members AS m ON m.member_id = t.author_id WHERE t.entry_id !=” AND t.site_id IN (‘1’) AND t.entry_date < 1462934343 AND (t.expiration_date = 0 OR t.expiration_date > 1462934343) AND t.status = ‘open’ ORDER BY FIELD(t.entry_id, ) LIMIT 0, 100

MySQL said: #1064 - 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 ‘) LIMIT 0, 100’ at line 1

The problem seems to be due to a missing column here:

ORDER BY FIELD(t.entry_id, ) 

I haven’t upgraded ExpressionEngine so I assume this is due to a PHP or MySQL upgrade.

We’re using an old version of ExpressionEngine (version 2.0). Any suggestions what the problem might be and how we can rectify it?

I am a bit wary of simply upgrading EE without understanding the problem first. I don’t want to compound problems.

       
Derek Jones's avatar
Derek Jones
7,561 posts
9 years ago
Derek Jones's avatar Derek Jones

That actually looks more like this bug, but that was fixed in 2.0.1 public beta. What’s the full version number that you’re running?

       
snowcrash's avatar
snowcrash
3 posts
9 years ago
snowcrash's avatar snowcrash

$config[‘app_version’] = ‘201pb01’;

       
Derek Jones's avatar
Derek Jones
7,561 posts
9 years ago
Derek Jones's avatar Derek Jones

Yeah you need to update, and badly! It’s not related to a PHP or MySQL server upgrade, but upgrading to at least 2.11.1, if not v3, will leave you compatible with PHP 7 and MySQL 5.7.

       
snowcrash's avatar
snowcrash
3 posts
9 years ago
snowcrash's avatar snowcrash

How do I download 2.11.1?

I don’t see anything here: https://store.ellislab.com/#ee-core or here: https://ellislab.com/expressionengine

I searched through the text looking for the words “previous” or “old”.

       
Derek Jones's avatar
Derek Jones
7,561 posts
9 years ago
Derek Jones's avatar Derek Jones

Head on over to your Manage Purchases page and you will find downloads for any licenses you maintain. If you do not have access to the license that your site is running on, drop us an email at .(JavaScript must be enabled to view this email address) and we’ll help you track it down.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.