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.
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.expirati 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. I have figured out that if I run the query in Sequel Pro without
AND t.entry_date >= AND t.entry_date <=
It works! The query has no dates. Why would this happen?
I am guessing that the entry dates have got a little messed up somewhere.
Anyone have the vaguest clue?