WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#4228 closed defect (bug) (worksforme)

Search on Manage/Pages gives db error

Reported by: YellowSwordfish Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1.3
Component: Administration Keywords:
Focuses: Cc:

Description

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...

Change History (2)

comment:1 johnbillion7 years ago

  • Milestone 2.4 deleted

Worksforme in 2.1.3 and 2.3-alpha at r5401.

comment:2 foolswisdom7 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Closing "works for me" based on John's update.

Note: See TracTickets for help on using tickets.