• At the top of my public WordPress page, the following error shows:

    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 ‘) ORDER BY RAND() LIMIT 1’ at line 5]
    SELECT ID FROM wp_posts WHERE post_type = ‘post’ AND post_status = ‘publish’ AND post_date <= curdate( ) – INTERVAL 30 day AND ID Not IN () ORDER BY RAND() LIMIT 1

    I have no idea what this means. This is a new page to which I’m transferring content from my ‘old’ WordPress blog to one on a server under my own URL.

    Thanks.

    Dahna

Viewing 1 replies (of 1 total)
  • I don’t know the reason, but there is no list of ID numbers being passed to the ‘Not IN () ‘ part of the query. You would normally expect to see something like ‘Not IN (32,6,635) ‘.

Viewing 1 replies (of 1 total)
  • The topic ‘Fixing a WordPress Database/MySQL Syntax Error’ is closed to new replies.