You are here

function _recommender_updated_list in Recommender API 6

Same name and namespace in other branches
  1. 5 recommender.module \_recommender_updated_list()
1 call to _recommender_updated_list()
recommender_similarity_coocurrences in ./recommender.module
Co-ocurrences algorithm that compute similarity among mice based on how many cheese they share.

File

./recommender.module, line 542
Providing generic recommender system algorithms.

Code

function _recommender_updated_list($app_id, $max_timestamp, $field = 'mouse_id') {
  $result = db_query("SELECT DISTINCT {$field} FROM {recommender_updated_queue} WHERE app_id=%d AND created<=%d", $app_id, $max_timestamp);
  while ($r = db_fetch_array($result)) {
    $updated[] = $r[$field];
  }
  return '(' . implode(',', $updated) . ')';
}