H HJW Active member Feb 26, 2020 #1 Hello, As the reactions are stored in a blob (like {"1":11,"2":3,"4":5}) does anyone have a clue how to order by the most laughed at comments ("3")? thanks
Hello, As the reactions are stored in a blob (like {"1":11,"2":3,"4":5}) does anyone have a clue how to order by the most laughed at comments ("3")? thanks
K Kirby Well-known member Feb 26, 2020 #2 Whey do you want to mess with the JSON? Code: SELECT COUNT(*) AS total, content_type, content_id FROM xf_reaction_content WHERE reaction_id = 3 GROUP BY content_type, content_id ORDER BY total DESC Upvote 0 Downvote
Whey do you want to mess with the JSON? Code: SELECT COUNT(*) AS total, content_type, content_id FROM xf_reaction_content WHERE reaction_id = 3 GROUP BY content_type, content_id ORDER BY total DESC