#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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)