Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#14234 closed defect (bug) (invalid)

ORDER BY FIELD() query not working with $wpdb

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

Description

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
16 years ago

  • Resolutioninvalid
  • Status newclosed

#2 @dd32
16 years ago

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