You are here

function uc_product_feature_load in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_product/uc_product.module \uc_product_feature_load()
  2. 7.3 uc_product/uc_product.module \uc_product_feature_load()

Loads a product feature object.

@todo: should return an object instead of array.

Parameters

$pfid: The product feature ID.

$fid: Optional. Specify a specific feature id.

Return value

The product feature object.

2 calls to uc_product_feature_load()
uc_product_features in uc_product/uc_product.admin.inc
Displays the product features tab on a product node edit form.
uc_product_feature_delete in uc_product/uc_product.module
Deletes a product feature object.

File

uc_product/uc_product.module, line 2025
The product module for Ubercart.

Code

function uc_product_feature_load($pfid, $fid = NULL) {
  if (isset($fid)) {
    $feature = db_fetch_array(db_query("SELECT * FROM {uc_product_features} WHERE pfid = %d AND fid = '%s'", $pfid, $fid));
  }
  else {
    $feature = db_fetch_array(db_query("SELECT * FROM {uc_product_features} WHERE pfid = %d", $pfid));
  }
  return $feature;
}