Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#24687 closed enhancement (duplicate)

WP_Query applies `order` only to last key in `orderby`

Reported by: andy Owned by:
Priority: normal Milestone:
Component: Query Version: 3.5
Severity: normal Keywords:
Cc: Focuses:

Description

If you need something like ORDER BY menu_order DESC, ID DESC you are forced to use filters. Instead let's allow orderby to specify either ASC or DESC for each key. Furthermore let's allow orderby to be written naturally with spaces and/or commas (while not strictly checking their correctness as SQL).

Attachments (1)

24687.diff​ (1.5 KB ) - added by andy 13 years ago.

Download all attachments as: .zip

Change History (2)

#1 @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed
  • Version trunk → 3.5

Duplicate of #17065.

Note: See TracTickets for help on using tickets.