mark can't recalculate results
fixed:
function mark_votingapi_results_alter(&$results, $content_type, $content_id) {
$cache = db_query("SELECT v.value_type,v.tag,v.content_id, COUNT(v.value) AS count FROM {votingapi_vote} v
WHERE v.value_type ='mark' AND v.content_id = %d AND v.content_type = '%s'
GROUP BY v.content_id", $content_id, $content_type);
while ($result = db_fetch_array($cache)) {
$results[$result['tag']][$result['value_type']]['count'] = $result['count'];
}
}
Comments
Comment #1
ericxu131 commentedComment #2
ericxu131 commentededit group by v.content_id,v.tag now it work great.
Comment #3
Nick Robillard commentedFixed for me. Thanks ericxu131.