You are here

function pet_load in Previewable email templates 6

Same name and namespace in other branches
  1. 8.4 pet.module \pet_load()
  2. 8 pet.module \pet_load()
  3. 7 pet.module \pet_load()

Return one PET.

9 calls to pet_load()
petreference_autocomplete_validate in modules/petreference/petreference.module
Validate an autocomplete element.
petreference_field in modules/petreference/petreference.module
Implementation of hook_field().
petreference_rules_action_load in modules/petreference/petreference.rules.inc
pet_action_email in ./pet.module
Sends an email related to an Ubercart order, triggered by a conditional action.
pet_add_form in ./pet.admin.inc
Add/Edit PET page.

... See full list

File

./pet.module, line 107
Previewable E-mail Template module.

Code

function pet_load($param) {
  if (is_numeric($param)) {
    return db_fetch_object(db_query("SELECT * FROM {pets} WHERE pid = %d", $param));
  }
  else {
    return db_fetch_object(db_query("SELECT * FROM {pets} WHERE name='%s'", $param));
  }
}