/[drupal]/contributions/modules/cre/cre_query_obj.inc
ViewVC logotype

Diff of /contributions/modules/cre/cre_query_obj.inc

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

revision 1.6.2.3.2.4, Tue Jul 3 04:25:45 2007 UTC revision 1.6.2.3.2.5, Mon Jul 23 14:05:48 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: cre_query_obj.inc,v 1.6.2.3.2.3 2007/05/09 17:14:45 hickory Exp $  // $Id: cre_query_obj.inc,v 1.6.2.3.2.4 2007/07/03 04:25:45 scottreynolds Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 88  class _cre_query { Line 88  class _cre_query {
88      _db_query_callback($this->conditions_values, TRUE);      _db_query_callback($this->conditions_values, TRUE);
89      $where = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $where);      $where = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $where);
90    
91      $query_type = variable_get('cre_query_type', 'accurate') ;      $query_type = variable_get('cre_query_type', 'accurate');
92    
93      $query_string  =      $query_string  =
94       'SELECT '. implode(",",$this->columns) .        'SELECT '. implode(",", $this->columns) .
95       ' FROM ' . implode(", ", $this->tables) .        ' FROM ' . implode(", ", $this->tables) .
96       ' WHERE ' . $where .        ' WHERE ' . $where .
97       ' GROUP BY d.content_id1 ';        ' GROUP BY d.content_id1 ';
98      if($query_type == 'fast' || $query_type == 'accurate') {  
99         $query_string .= 'HAVING score > 50 ORDER BY score DESC';      if ($query_type == 'fast' || $query_type == 'accurate') {
100       }        $query_string .= 'HAVING score > 50 ORDER BY score DESC';
101       else {      }
102        else {
103       }$query_string .= 'ORDER BY score ASC';        $query_string .= 'ORDER BY score ASC';
104        }
105      return $query_string;      return $query_string;
106    }    }
107  }  }

Legend:
Removed from v.1.6.2.3.2.4  
changed lines
  Added in v.1.6.2.3.2.5

  ViewVC Help
Powered by ViewVC 1.1.2