You are here

function certificate_criterion_load in Certificate 6

File

./certificate.module, line 432
Certificate module.

Code

function certificate_criterion_load($id) {
  $sql = "select * from {certificate_criteria} cc\n    left join {certificate_types} ct on ct.type_id = cc.type_id\n    where cc.check_id = %d";
  $query = db_query($sql, $id);
  if ($criterion = db_fetch_object($query)) {
    $criterion->check_key = unserialize($criterion->check_key);
    return $criterion;
  }
  else {
    return FALSE;
  }
}