/[drupal]/contributions/modules/votingapi/votingapi.module
ViewVC logotype

Diff of /contributions/modules/votingapi/votingapi.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.46.2.16, Thu Jan 1 00:40:30 2009 UTC revision 1.46.2.17, Thu Jan 1 00:47:50 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: votingapi.module,v 1.46.2.15 2008/10/09 21:12:35 eaton Exp $  // $Id: votingapi.module,v 1.46.2.16 2009/01/01 00:40:30 chriskennedy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 426  function _votingapi_get_standard_results Line 426  function _votingapi_get_standard_results
426    $sql  = "SELECT v.tag, v.value, v.value_type, COUNT(1) AS score ";    $sql  = "SELECT v.tag, v.value, v.value_type, COUNT(1) AS score ";
427    $sql .= "FROM {votingapi_vote} v ";    $sql .= "FROM {votingapi_vote} v ";
428    $sql .= "WHERE v.content_type = '%s' AND v.content_id = %d AND v.value_type = 'option' ";    $sql .= "WHERE v.content_type = '%s' AND v.content_id = %d AND v.value_type = 'option' ";
429    $sql .= "GROUP BY v.value, v.tag";    $sql .= "GROUP BY v.value, v.tag, v.value_type";
430    $results = db_query($sql, $content_type, $content_id);    $results = db_query($sql, $content_type, $content_id);
431    while ($result = db_fetch_array($results)) {    while ($result = db_fetch_array($results)) {
432      $cache[$result['tag']][$result['value_type']]['option-'. $result['value']] = $result['score'];      $cache[$result['tag']][$result['value_type']]['option-'. $result['value']] = $result['score'];

Legend:
Removed from v.1.46.2.16  
changed lines
  Added in v.1.46.2.17

  ViewVC Help
Powered by ViewVC 1.1.2