donutzeatpeople
Programmer
It seems that whenever I try to make a query with ORDER BY COUNT(field) I always recieve an error from MySQL. Here is the specific query I am trying to use:
SELECT u.username,COUNT(m.entryid) FROM users as u,messages as m WHERE m.userid = u.userid GROUP BY u.userid ORDER BY COUNT(m.entryid) LIMIT 0,10
There must be an easy solution that I just don't see. Can anyone help? Thank you!
SELECT u.username,COUNT(m.entryid) FROM users as u,messages as m WHERE m.userid = u.userid GROUP BY u.userid ORDER BY COUNT(m.entryid) LIMIT 0,10
There must be an easy solution that I just don't see. Can anyone help? Thank you!