I have a very strange error as the title suggests. I am hoping someone might have come across it and found a fix.

On only certain entries, if I edit them, I get:

A Database Error Occurred
Unable to connect to your database server using the provided settings.

Filename: core/EE_Config.php

Line Number: 208

I am using Focus Lab's config set up. Everything is working perfectly, apart from certain channels.

EE 2.9 NginX

If I try to visit the page on the front end I get an SQL error:

Error Number: 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 'AND t.entry_date <= AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date ' at line 2

SELECT t.entry_id FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1') AND t.entry_date < 1406809317 AND (t.expiration_date = 0 OR t.expiration_date > 1406809317) AND t.entry_id = '33' AND t.channel_id = '1' AND t.entry_date >= AND t.entry_date <= AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 1

Filename: modules/channel/mod.channel.php

Line Number: 2161

As mentioned, it is only certain entries and not others.

Anyone have the vaguest clue?

  • Anybody? Bueller?
    – T2theC
    Aug 1 '14 at 10:08
  • Are the issues with certain channels, or certain entries? The answer will point to different issues. Your query has multiple t.entry_date conditions for some reason as well - are you using any extensions which are specifically activated for the channels in question? Aug 11 '14 at 18:34
  • Hi Derek. Thanks for getting back. There a a couple of channels involved in the coding. Profile:edit member profiles and a products channel. Its quite a complex bit of code that looking up the member and then if there are price overrides for them, they override the default pricing. I'll take a look at the extensions. There is a maths ext for sure. It has been working well up until recently. I'll get back on to it this afternoon (UK) and post up the code if it helps. Thanks again.
    – T2theC
    Aug 12 '14 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.