bb_register_view – from SQL to array
-
I work with bbPress 0.9.
Been trying for hours to get this SQL into a view?
How should the array for bb_register_view() look like?
SELECT bbt.*, (SELECT COUNT(*) FROM bb_ratings WHERE topic_id=bbt.topic_id) AS counts
FROM bb_topics bbt, bb_ratings bbr
WHERE bbt.forum_id = 2 AND bbt.topic_status = 0
GROUP BY bbt.topic_id
ORDER BY counts DESC
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.