[wp-trac] [WordPress Trac] #17065: Independent ASC/DESC in multiple ORDER BY statement.

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 9 05:48:48 UTC 2011


#17065: Independent ASC/DESC in multiple ORDER BY statement.
-------------------------------------+------------------------------
 Reporter:  ericmann                 |       Owner:  ericmann
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Query                    |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------

Comment (by dd32):

 > why do we require the orderby meta_key to be part of the meta_query?

 Quite simply, because otherwise, it's not included in the JOIN's which are
 used. We could add an extra join for the meta_key that it's being ordered
 by, but with the move of the meta queries into a seperate function, that
 might be more difficult and dirty than it sounds.

 > inspired by WordCamp GC. :)

 I'm glad it got at least one comment out of it, stick around and make
 another dozen yeah? :)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17065#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list