Here is my like table with 6 tabs (don’t if tab is the right name) I have a good request to select topics with the more likes, recents, and in a specific forum.
http://trotirider.com/stak1.jpg
SELECT tid, Sum(value) AS value_total
FROM punlike
WHERE value = 1
AND (fid = 31 OR fid = 33)
GROUP BY tid
ORDER BY value_total DESC, tid DESC
http://trotirider.com/stak2.jpg
But I only need ‘tid’, value_total is just here to order by. How to get only one tab with this request ? Is it possible to make it with a sql request or do I must make it in php with a loop or other ?
Thanks.
Not sure if this is going to work, but give it a shot:
If that doesn’t work, try this: