[wp-trac] Re: [WordPress Trac] #8022: non-DISTINCT query in get_archives for postbypost

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 11 08:55:17 GMT 2008


#8022: non-DISTINCT query in get_archives for postbypost
----------------------+-----------------------------------------------------
 Reporter:  kevinB    |        Owner:  anonymous
     Type:  defect    |       Status:  reopened 
 Priority:  low       |    Milestone:           
Component:  Template  |      Version:  2.8      
 Severity:  normal    |   Resolution:           
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by mrmist):

 You still can't affect the results of a SELECT * on this table by adding a
 DISTINCT to it.  The results of SELECT * FROM posts are always distinct,
 because there's a unique column in the result set.  If you want to
 DISTINCT the results for some other reason (e.g. DISTINCTing the result
 set of a SELECT which is joining to this result set) then you need to
 alter that query, not this one, and that query would have to be specific
 about what columns it returns.

 I'll not close this again, I leave that to someone else, but the existing
 patch is invalid.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8022#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list