WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 2.1 Search Engine bug? (6 posts)

  1. specialkitty
    Member
    Posted 7 years ago #

    Hi,
    I think I may have found a bug in in the wp 2.1 search engine. If you search for just a space you get the following db error:
    If you search for just a space using wordpress 2.1 you get the following DB error:

    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 ') AND (post_type = 'post' AND (post_status = 'publish' OR post_status = 'privat' at line 1]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND () AND (post_type = 'post' AND (post_status = 'publish' OR post_status = 'private')) ORDER BY post_date DESC LIMIT 0, 25

    Can anyone confirm this as a wp2.1 bug?

  2. Class
    Member
    Posted 7 years ago #

    This happens to me with WP2.1 as well.
    It's ugly, thanks for the heads up.

  3. mayreee
    Member
    Posted 7 years ago #

    I am having this same exact problem also. Anyone have any ideas?

  4. mayreee
    Member
    Posted 7 years ago #

    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 '-1' at line 21]
    SELECT posts.*, CASE WHEN posts.post_title REGEXP 'Search' THEN 1 ELSE 0 END AS keyword_in_title, MATCH ( posts.post_title, posts.post_content ) AGAINST ( 'Search' ) AS mysql_score FROM wp_posts as posts LEFT JOIN wp_postmeta as postmeta ON postmeta.post_id = posts.ID WHERE posts.post_date_gmt <= '2007-03-01 02:02:00' AND ( posts.post_password = '' ) AND ( ( post_status = 'publish' OR ( post_status = 'static' AND postmeta.meta_value = 'article.php' ) ) ) AND ( posts.post_title REGEXP 'Search' OR posts.post_content REGEXP 'Search' ) ORDER BY keyword_in_title DESC, mysql_score DESC, posts.post_date DESC LIMIT 0, -1

  5. webDressing
    Member
    Posted 7 years ago #

    Why would someone search for empty space?

    ...unless their closets are full...

  6. Dickie
    Member
    Posted 7 years ago #

    Sorry Ignore... found the ticket
    http://trac.wordpress.org/ticket/3759

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags