Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14234 closed defect (bug) (invalid)

ORDER BY FIELD() query not working with $wpdb

Reported by: stoosh Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.9.2
Component: Database Keywords:
Focuses: Cc:


Trying to custom order a query using the FIELD() function, doesn't seem to work with the Wpdb::query method.

An example query is
SELET * FROM wp_table WHERE id in (9,4,1,2) ORDER BY FIELD(9,4,1,2)

The query executes but doesn't correctly order

Change History (2)

#1 @stoosh
10 years ago

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

#2 @dd32
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.