[wp-trac] Re: [WordPress Trac] #9167: query_posts('meta_key=foo') returns duplicate posts

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 19 17:05:29 GMT 2009


#9167: query_posts('meta_key=foo') returns duplicate posts
--------------------------+-------------------------------------------------
 Reporter:  scribu        |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.7.2    
Component:  General       |     Version:           
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by mrmist):

 You need to be careful using group by.  MySQL is pretty sloppy when it
 comes to applying group_by to queries in comparison with other RDBMSs and
 essentially what you are doing is randomly throwing away information.

 Now, it may be that that is your intended result, but it probably isn't.

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


More information about the wp-trac mailing list