atr_profile_load

Versions
6.1
atr_profile_load($pid)

Load a settings profile.

Parameters

$pid The profile's ID.

Return value

A profile object or FALSE if no profile matched the provided $pid.

▾ 3 functions call atr_profile_load()

atr_form_review in atr/includes/atr.admin.inc
Form builder; manually configure and start a text review.
atr_form_review_submit in atr/includes/atr.admin.inc
Form submit handler for atr_form_review().
atr_profile_list in atr/includes/atr.admin.inc
List all settings profiles.

Code

atr/atr.module, line 225

<?php
function atr_profile_load($pid) {
  if ($profile = db_fetch_object(db_query("SELECT * FROM {atr_profile} WHERE pid = %d", $pid))) {
    $profile->methods = array();
    $result = db_query("SELECT method FROM {atr_profile_method} WHERE pid = %d", $pid);
    while ($method = db_result($result)) {
      $profile->methods[] = $method;
    }
    return $profile;
  }
  return FALSE;
}
?>