skyline — 2012-10-07T08:57:28-04:00 — #1
Is it possible to order by a 2nd query count?
I am displaying one mysql table with a standard select query, but I need to order the results by the number of votes each listing has (which is from a 2nd table "votes")
Is this possibe?
guido2004 — 2012-10-07T09:10:53-04:00 — #2
Yes, join the two tables, group by the first table's id, and order by COUNT(*)
skyline — 2012-10-07T09:35:46-04:00 — #3
Thanks. Can I grab an example?
skyline — 2012-10-07T09:41:37-04:00 — #4
Scratch that, got it