Hello,

I'm not good at this. Just spent a full day trying to figure this out and I can't. Any help would be greatly appreciated.

I'm using votingapi through voteupdown. So nodes have votes of +1 or -1. I'm trying to write a query that would display the number of +1 votes and the number of -1 votes for the specific node displayed. So something like:

"This node has 7 positive votes and 3 negative votes."

I think I need to do a SUM on votingapi_votes.value WHERE value = 1 (or -1) but can't figure how to just display the sum for the current node (nid). Maybe something where v.content_id = n.nid???

How to connect those? Or limit to current nid?

Thanks for any advice.

Comments

pshadow’s picture

sorry for the double post. i think the server was hanging...

coreb’s picture

Status: Active » Closed (duplicate)

Duplicate/Double post of http://drupal.org/node/141444

Just trying to reduce the issue queue to the actual problem only once.