Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #17065, comment 17


Ignore:
Timestamp:
11/08/2011 12:46:50 AM (14 years ago)
Author:
lukecarbis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17065, comment 17

    initial v1  
    55What about the usage case where I want to return results including but not limited to items that include the meta_key, and order by that meta_key. For example, I want to order posts by custom_meta_item, but I want to include posts that don't have any custom_meta_item.
    66
    7 This could be achieved by adding a second postmeta INNER JOIN to $pieces['join'], and using CASE to order in $pieces['order'].
     7This could be achieved by adding a second postmeta INNER JOIN to $pieces [ 'join' ], and using CASE to order in $pieces [ 'order' ] .
    88
    9 We could use the same syntax, but avoid ignoring orderby[0]['meta_key'] if it's not included in the meta_query.
     9We could use the same syntax, but avoid ignoring orderby [ 0 ] [ 'meta_key' ] if it's not included in the meta_query.
    1010
    1111Thoughts?