You are here

function _recommender_updated_list in Recommender API 5

Same name and namespace in other branches
  1. 6 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 564
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) . ')';
}