You are here

function _recommender_updated_max in Recommender API 5

Same name and namespace in other branches
  1. 6 recommender.module \_recommender_updated_max()
1 call to _recommender_updated_max()
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 555
Providing generic recommender system algorithms.

Code

function _recommender_updated_max($app_id) {
  $updated_info = db_fetch_array(db_query("SELECT COUNT(*) count, MAX(created) max\n          FROM {recommender_updated_queue} WHERE app_id=%d AND status!=-100", $app_id));

  // if nothing is updated, then do nothing.
  if ($updated_info['count'] == 0) {
    return NULL;
  }
  return $updated_info['max'];
}