I have table of comments which includes likes and dislikes, now i have problem with proper order..
Actually my system shows comments with greatest amount of likes on top.
I'm looking for something like system in youtube.
It means that comment with 100like/100dislikes is higher in order than 1/1..
I hope this is understandable :)
This is classic problem how to rank upvote/downvote, plus/minus, like/dislike and so on. There are a few possible solutions but they may give wrong result in specific conditions.
I strongly recommend reading and using ordering like in
How Not To Sort By Average Rating
Sample code (you can easily adapt it for your needs):