If you call that with no criteria then votingAPI will graciously return all the rows in the table to you and use PHP to select the top one.
I'm not sure exactly how, but we should ideally make that not happen :)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 591044_votingapi_single_result_really_single.patch | 889 bytes | greggles |
Comments
Comment #1
greggles_votingapi_select allows a $limit to be specified.
My suggestion is that we use the $limit parameter of votingapi_select_results which gets passed along to _votingapi_select so that votingapi_select_single_result_value will only select a single value.
Comment #2
gregglesI just ran into this again. The patch still applies cleanly to 6.x-2.x.
Comment #3
eaton commentedI've applied this to the D7 branch and will backport to D6. Thanks!
Comment #4
gregglesAwesome, thanks!
For my own tracking I'd like to keep this in an open state until it's in the 6.x branch.
Comment #5
eaton commentedCommitted to the 6.x branch -- I still need to do some testing to ensure none of the backported code causes problems. Once I'm comfortable with that I'll roll a new 6.x release. Thanks again!