Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#24687 closed enhancement (duplicate)

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

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

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 11 years ago.

Download all attachments as: .zip

Change History (2)

@andy
11 years ago

#1 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 3.5

Duplicate of #17065.

Note: See TracTickets for help on using tickets.