WordPress.org

Support

Support » How-To and Troubleshooting » Strange Database Errors

Strange Database Errors

  • What does this means? How to fix it?

    [30-Dec-2012 16:52:10] WordPress database error 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 ‘* FROM WHERE .post_status = ‘publish’ AND .post_type = ‘page’ ORDER BY .post_ti’ at line 1 for query SELECT .* FROM WHERE .post_status = ‘publish’ AND .post_type = ‘page’ ORDER BY .post_title ASC made by require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, triggerCache, initCache, getCacheLinks

    [30-Dec-2012 16:52:10] WordPress database error 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 ‘* FROM WHERE .post_status = ‘publish’ AND .post_type = ‘page’ ORDER BY .post_ti’ at line 1 for query SELECT .* FROM WHERE .post_status = ‘publish’ AND .post_type = ‘page’ ORDER BY .post_title ASC made by require, require_once, include, get_footer, locate_template, load_template, require_once, wp_footer, do_action, call_user_func_array, triggerCache, initCache, getCacheLinks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You’re missing the table name between the “FROM” and “WHERE” in both SQL statements so that MySQL doesn’t know which table to execute the query on. It looks like the table should be “wp_posts” though it could be a more complicated JOIN in there.

    If this is from code you added, it will be (relatively) easy to locate, but you didn’t say. If it’s just an error you’re getting and you have no idea where it’s coming from, you may need to go through the Master Troubleshooting List for your version of WordPress to identify the source. If it’s not code you wrote, it’s usually a custom theme or a plugin.

    It is a plugin – called generate cache. I have just deactivated is as I probably won’t be able to find where to add the table prefix and fix it.

    There are lots of caching plugins, so that’s probably the most efficient solution. You can just try another.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Strange Database Errors’ is closed to new replies.