Efficiency > Character Count. Although it would be nitpicky, you shouldn't really be doing selects in your order by like that, select it all at once and then order by what you need... Something like: http://pastebin.com/raw.php?i=Rx3wRqVr if I understand what you're going for at all...
Even using that approach I would need to use a subquery if I want to order the list by the last action (in this case likes) because LAST() as a function needs a workaround MySQL
The goal of the query is to sort all players by the amount of likes they have, and then again by the time of their last like (LIMIT 10 or something is gonna be appended at the end of course)
And I wasn't saying the query was awesome cause of the length, just that I've never really used subqueries and aliases before
That's a bit better, all it needs now i guess is a check to see if l.owner matches a plot's owner (with the plot's id being l.plot_id)
I accomplished that with a subquery, ... AND l.owner = (SELECT `owner` FROM plot_table WHERE `id`=l.`plot_id`) problem is, its used twice. Which bugs me
No it's not that, SQL can be tricky and deity passed his knowledge (kinda), onto myself, and now I pass it to you :) You should be able to extrapolate the concept behind it for sql in general, it's a very very powerful language
Comments on Profile Post by KILL3RTACO