engelsol Posted July 10, 2007 Share Posted July 10, 2007 please help me with this statement. I want to get: 1-list of most commented stories SELECT articles.story_id, articles.headline, count(comments.comment_id) AS counter FROM articles LEFT JOIN comments ON articles.story_id = comments.story_id GROUP BY articles.story_id ORDER BY counter DESC LIMIT 20 engelsol Link to comment https://forums.phpfreaks.com/topic/59311-solved-please-help-with-this-mysql-query-statement/ Share on other sites More sharing options...
engelsol Posted July 10, 2007 Author Share Posted July 10, 2007 it just work! My bad Link to comment https://forums.phpfreaks.com/topic/59311-solved-please-help-with-this-mysql-query-statement/#findComment-294623 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.