[wp-trac] [WordPress Trac] #25180: Make it possible to select only posts with comment_count > 0
WordPress Trac
noreply at wordpress.org
Thu Aug 29 17:06:08 UTC 2013
#25180: Make it possible to select only posts with comment_count > 0
----------------------------+--------------------
Reporter: wonderboymusic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: Query | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------------+--------------------
Comment (by nacin):
Specifically this IRC discussion:
http://irclogs.wordpress.org/chanlog.php?channel=wordpress-
dev&day=2013-08-29&sort=asc#m677727
For #11398, you can order by comment_date. The problem being, any posts
without comments are fetched and stuck at the bottom.
That ORDER BY plus WHERE comment_count > 0 means we get only posts with
comments. Though at that point it would be cheaper to convert to the LEFT
JOIN to an INNER JOIN.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25180#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list