[wp-trac] [WordPress Trac] #4417: Error Searching For Posts

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 6 18:51:48 GMT 2007


#4417: Error Searching For Posts
----------------------------+-----------------------------------------------
 Reporter:  cpoteet         |       Owner:  anonymous   
     Type:  defect          |      Status:  new         
 Priority:  high            |   Milestone:              
Component:  Administration  |     Version:  2.2         
 Severity:  normal          |    Keywords:  dev-feedback
----------------------------+-----------------------------------------------
 Got this when searching for a post from the manage posts page.

 {{{
 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 19]
 SELECT posts.*, CASE WHEN posts.post_title REGEXP 'bermuda' THEN 1 ELSE 0
 END AS keyword_in_title, MATCH ( posts.post_title, posts.post_content )
 AGAINST ( 'bermuda' ) AS mysql_score FROM wp_posts as posts WHERE
 posts.post_date_gmt <= '2007-06-06 18:51:00' AND ( posts.post_password =
 '' ) AND ( posts.post_status = 'static' OR posts.post_status = 'publish' )
 AND ( posts.post_title REGEXP 'bermuda' OR posts.post_content REGEXP
 'bermuda' ) ORDER BY keyword_in_title DESC, mysql_score DESC,
 posts.post_date DESC LIMIT 0, -1
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4417>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list