• I am using WP 2.6.3 and MySql 4.0. I do not understand the MySql databases and have no idea how to fix the following problem. When I try to retrieve an individual post I receive the following two messages then the post. It isn’t a huge deal, but I would love to make it go away. I don’t know how to upgrade the MySql if that is what is required and I don’t know what to edit. Guidance would be appreciated.

    The errors:

    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 ‘AS p WHERE p.post_date < ‘2008-11-18 20:43:13’ AND p.post_type]
    SELECT p.* FROM (wp_posts LEFT JOIN wp_postmeta as pl_wp_postmeta ON (wp_posts.ID = pl_wp_postmeta.post_id)) AS p WHERE p.post_date < ‘2008-11-18 20:43:13’ AND p.post_type = ‘post’ AND p. (wp_posts.post_status = ‘publish’ OR (wp_posts.post_status = ‘private’)) ORDER BY p.post_date DESC LIMIT 1

    and

    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 ‘AS p WHERE p.post_date > ‘2008-11-18 20:43:13’ AND p.post_type]
    SELECT p.* FROM (wp_posts LEFT JOIN wp_postmeta as pl_wp_postmeta ON (wp_posts.ID = pl_wp_postmeta.post_id)) AS p WHERE p.post_date > ‘2008-11-18 20:43:13’ AND p.post_type = ‘post’ AND p. (wp_posts.post_status = ‘publish’ OR (wp_posts.post_status = ‘private’)) ORDER BY p.post_date ASC LIMIT 1

  • The topic ‘sql syntax error- please help’ is closed to new replies.