Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Jirinex Posted January 16, 2018 Posted January 16, 2018 Hello, I assume sorting a database posts by the amount of "likes" is not possible, so could anyone maybe point me to an sql query I could use to get this info? I have in one post about 300 or so post and I need them sorted by their likes. Thanks.
Numbered Posted January 16, 2018 Posted January 16, 2018 Something like that? select type_id as post_id, count(id) as likes from core_reputation_index where type = 'pid' group by type_id order by likes desc limit 5;
Jirinex Posted January 16, 2018 Author Posted January 16, 2018 Thanks a lot, that looks close to what I need, but can I also match the post id to the user who made the reply? Edit: I need this list for a specific article, not for all posts in the articles database.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.