WordPress.org

Ready to get started?Download WordPress

Forums

WordPress database error (...) FROM wp_post2cat WHERE category_id= (3 posts)

  1. cmayr75
    Member
    Posted 7 years ago #

    hi there. any help needed: i set up a site for my mom, today she reported do get this error on the page itself on top of each page / article:

    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 '' at line 1]
    SELECT DISTINCT(post_id) FROM wp_post2cat WHERE category_id=

    this error only appears within adminpanel on the overview of articles where usually 15 should be displayed, but i do see just 5. maybe my mom didn't enter more for month 'june' which is by deafult set on the dropdown on that page.

    i'm using wordpress 1.5.2 hosted at german webhoster strato.de, i have no clue 'bout php and sql.

    my mom wanted to enter a few alt-tags for the images because she never did before. i told her not to use chars like ' " and / within the alt-tags. maybe she did enter any char which lead to the problem? it's just a guess

  2. cmayr75
    Member
    Posted 7 years ago #

    i have the 'events'-plugin installed but we've been never using it and when de-activating i do get another error so left it activated. on the mainpage i just saw this error-message within the never-used-events-section:

    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 post_date LIMIT 5' at line 12]
    SELECT p.id AS id, post_title, post_date, u.user_nickname AS author FROM wp_posts p, wp_post2cat p2c, wp_users u WHERE post_status = 'publish' AND post_date_gmt > '2006-06-15 00:00:00' AND p.id = post_id AND p.post_author = u.id AND category_id = ORDER BY post_date LIMIT 5

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    What plugins do you have activated?

Topic Closed

This topic has been closed to new replies.

About this Topic