Title: Database Syntax Error
Last modified: April 3, 2019

---

# Database Syntax Error

 *  Resolved [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/)
 * I am getting an entry in my error_log file whenever I enable caching. I have 
   never seen this before. I have deleted and reinstalled the plugin and “repaired”
   the database using phpMyAdmin.
 * I am using ClassicPress version 1.0.1 and the problem is not happening on my 
   other CP sites.
 * The message is:
 * `database error You have an error in your SQL syntax; check the manual that corresponds
   to your MariaDB server version for the right syntax to use near ') AND ((cp_u5p2_posts.
   post_status = 'publish')) ORDER BY cp_u5p2_posts.ID DESC ' at line 1 for query
   SELECT SQL_CALC_FOUND_ROWS cp_u5p2_posts.ID FROM cp_u5p2_posts WHERE 1=1 AND ()
   AND ((cp_u5p2_posts.post_status = 'publish')) ORDER BY cp_u5p2_posts.ID DESC 
   LIMIT 0, 3 made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters,
   WpFastestCache->create_preload_cache, PreloadWPFC::create_preload_cache`
 * I have the preload set to 4 and turning restart on or off makes no difference.
 * Any idea what is going on?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11387111)
 * I turned preload off altogether and I don’t get the error message.
 * The site is creating the cached files okay with it off. I don’t really understand
   what preload is actually for, but having it turned off doesn’t seem to have affected
   caching?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11388810)
 * Please contact me via email: [https://www.wpfastestcache.com/contact-us/](https://www.wpfastestcache.com/contact-us/)
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11419183)
 * I fixed the problem 🙂 You need to delete WP Fastest Cache and download the following
   version to get the latest changes.
 * [https://downloads.wordpress.org/plugin/wp-fastest-cache.zip](https://downloads.wordpress.org/plugin/wp-fastest-cache.zip)
 *  Thread Starter [Graham](https://wordpress.org/support/users/sandgroper/)
 * (@sandgroper)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11419286)
 * Thanks Emre,
 * It does seem to have fixed the problem. So far no error log message with Preload
   enabled.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11420449)
 * You are welcome.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Database Syntax Error’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/database-syntax-error-2/#post-11420449)
 * Status: resolved