Forums

[Plugin: Search Everything] Database error with SE 4.7.6.2 and WP 2.6.2 (1 post)

  1. avinashm
    Member
    Posted 3 years ago #

    Hi,

    I just noticed that Search Everything (or WordPress) was issuing invalid SQL statements which made my MySQL complain a lot. For example, this is what is being sent to MySQL:

    SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_posts.*
    FROM wp_posts
    LEFT JOIN wp_comments AS c ON ( comment_post_ID = ID )
    WHERE 1=1
    AND ( wp_posts.(wp_posts.post_status = 'publish') OR
    ( c.comment_post_ID = wp_posts.ID AND c.comment_approved = '1' AND c.comment_content LIKE '%something%') )
    AND post_type != 'revision'
    ORDER BY wp_posts.post_date
    DESC LIMIT 0, 5

    The problem seems to be on line 5 i.e. wp_posts.(wp_posts.post_status = 'publish') which should have been (wp_posts.post_status = 'publish') only. I've looked in search_everything.php but I have had some trouble finding the bug.

    By the way, I only have those options in Search Everything:

    Search every page (non-password protected)
    Search every comment
    Search approved comments only?

    Hope I am clear enough.

Topic Closed

This topic has been closed to new replies.

About this Topic