Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Sorting links by rating

Quote Reply
Sorting links by rating
Hi,

I've asked this question before. I never seem to get a straight answer or any answer at all sometimes. I have my links setup up to let vistors rate the links on a scale of 1 to 5. When a vistor rates the link the rating is displayed with the star system. 1 star really bad, 5 stars really good, 3 1/2 stars not too shabby (like amazon).

how can i get the LINKS SQL to list the rated and unrated links in order by highest rating to lowest rating?

if anyone knows please help!

Eddie
Quote Reply
Re: [eddie123] Sorting links by rating In reply to
I can't see why you've found this so difficult to solve - I think you just need to change build_sort_order_category in admin->setup->build options to

Rating DESC

Laura.
The UK High Street
Quote Reply
Re: [afinlr] Sorting links by rating In reply to
Hi,

Is there also a way to sort them by the average review rating?

(re: http://www.gossamer-threads.com/...i?post=241365#241365)

-Katy
Quote Reply
Re: [katy] Sorting links by rating In reply to
This is rather more complicated as the average rating is not a field in the database - using the global it is just calculated as needed. The only way I can think of to do this would be to actually add a field to the database containing the average rating and using the global to update this field - either dynamically or at build time. Unless anyone has a better idea?