[wp-trac] Re: [WordPress Trac] #8022: non-DISTINCT query in
get_archives for postbypost
WordPress Trac
wp-trac at lists.automattic.com
Thu Feb 5 10:46:54 GMT 2009
#8022: non-DISTINCT query in get_archives for postbypost
----------------------------------------+-----------------------------------
Reporter: kevinB | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.8
Component: Template | Version: 2.7
Severity: normal | Resolution:
Keywords: archives,postbypost,filter |
----------------------------------------+-----------------------------------
Changes (by kevinB):
* keywords: => archives,postbypost,filter
* priority: low => normal
* version: 2.8 => 2.7
Comment:
mist, I'm just now checking back in and see that we haven't made any
progress in understanding each other. What you said is true for SELECT
DISTINCT *, but the last patch I posted was a SELECT DISTINCT
$wpdb->posts.*
Sometimes there are reasons to use LEFT JOINs, and those can lead to
duplicate post names/IDs in the result set.
From your previous suggestion, I think we can agree on the validity of
this new patch's API even if we don't agree on the validity of SQL
statements it might facilitate.
The separate filters getarchives_distinct and getarchives_fields follow
the precedent of posts_distinct and posts_fields. The default-merged args
array is passed as a 2nd argument. I'm not applying these filters to the
monthly/weekly/etc. archive queries, but future archive types could apply
them as needed.
--
Ticket URL: <http://trac.wordpress.org/ticket/8022#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list