Sorting by voting api
Hi. I'm working on gallery-style module for my client and I'm having a problem with sorting images/videos(whatever) by voting api. The first problem is that I didn't know how to edit my query to work with voting api, but I took query from views I've created for testing and implemented it into mine. But it's not working. Second problem is that the sorting is only by percent, but it's not accurate, because there is no sorting by number of votes too.
Here is my query -> http://rafb.net/p/3e1bgT32.html
Here is votingapi cache table -> http://img268.imageshack.us/img268/9692/votinagpicache.jpg
Here is how I'm sorting results -> http://rafb.net/p/dUP1lD34.html
Here is second votinagpi table -> http://img35.imageshack.us/img35/3497/votingapi.jpg
Any Ideas?
edit:
problem solved.
