[eluser]digity[/eluser]
How do I break down or modularized the query below using Active Records?
Code:
SELECT users.username, comments.user_id, COUNT(*) as comment_count FROM users, comments WHERE comments.topic_id='.$topic_id.' AND users.user_id=comments.user_id GROUP BY user_id ORDER BY comment_count DESC
Thanks in advance