[wp-trac] [WordPress Trac] #4228: Search on Manage/Pages gives db error

WordPress Trac wp-trac at lists.automattic.com
Sun May 6 22:14:41 GMT 2007

#4228: Search on Manage/Pages gives db error
 Reporter:  YellowSwordfish  |       Owner:  anonymous
     Type:  defect           |      Status:  new      
 Priority:  normal           |   Milestone:  2.4      
Component:  Administration   |     Version:  2.1.3    
 Severity:  normal           |    Keywords:           
 using the Search on ther manage Pages results in a db error. On my system
 both 2.1.3 and 2.3(?) alpha. Search term was 'sub': Result:

 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 'sub' THEN 1 ELSE 0 END
 AS keyword_in_title, MATCH ( posts.post_title, posts.post_content )
 AGAINST ( 'sub' ) AS mysql_score FROM wp_posts as posts WHERE
 posts.post_date_gmt <= '2007-05-06 22:08:00' AND ( posts.post_password =
 '' ) AND ( posts.post_status = 'static' OR posts.post_status = 'publish' )
 AND ( posts.post_title REGEXP 'sub' OR posts.post_content REGEXP 'sub' )
 ORDER BY keyword_in_title DESC, mysql_score DESC, posts.post_date DESC
 LIMIT 0, -1

 Note also that there is a post_status='static' in there...

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

More information about the wp-trac mailing list