| 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 |
| 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 |
} |
} |