Hello everyone ! ,
I am working on a rating field in my database. Basically , my rating formula goes like this
Ofcourse , its the average rating. I store the total points and total ratings in a single field called 'catrating' (like 4/2 i.e points=4 ratings=2) and explode it with php to get required values. What am looking for is , is there an easy MySQL inbuilt function to sort the ratings ( Like sorting numbers) like these directly in the query with some REGEX and AVG , so that all the top rated stuff gets sorted in the DESC order ?
Thanks so much !
I am working on a rating field in my database. Basically , my rating formula goes like this
Code:
RATING = TOTAL POINTS / TOTAL RATINGS
Thanks so much !
Comment