Jump to content

Easy question - Logic help.


scottrohe

Recommended Posts

Hey guys, having some trouble with my logic CAUSE I SUCKKK.

Anyways,
Here's what i'm trying to do. I have a Rating system (0-5 stars). I want to display the 'Top Rated Layouts' when I 'ORDER BY ranking' it works but it displays the first layouts that have been rated with 1 vote / 5 stars.. So, what I need it to do is display the actual TOP rated layouts for example.. If a layout has 3 votes, and its average ranking is still 5 stars, obviously it's better than the layout that has only 1 vote with 5 stars. I have tried 'ORDER BY (ranking*votes)' but that bumps say a layout with a average ranking of 4.80, with 3 votes to the second position above a layout that has like 2 votes with a 5.00 ranking average.

What am I doing wrong in my logic (I suck at math.)? What do I order by? Thanks for your time.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.