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

ericxu131’s picture

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,v.tag", $content_id, $content_type);

  while ($result = db_fetch_array($cache)) {
    $results[$result['tag']][$result['value_type']]['count'] = $result['count'];
  }
}
ericxu131’s picture

edit group by v.content_id,v.tag now it work great.

Nick Robillard’s picture

Fixed for me. Thanks ericxu131.