WordPress.org

Ready to get started?Download WordPress

Forums

Strange Database Errors (4 posts)

  1. duda
    Member
    Posted 1 year ago #

    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

  2. linux4me2
    Member
    Posted 1 year ago #

    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.

  3. duda
    Member
    Posted 1 year ago #

    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.

  4. linux4me2
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic