You are here

function hosting_get_packages_by_type in Hosting 7.3

Same name and namespace in other branches
  1. 5 package/hosting_package.module \hosting_get_packages_by_type()
  2. 6.2 package/hosting_package.module \hosting_get_packages_by_type()
  3. 7.4 package/hosting_package.module \hosting_get_packages_by_type()

@todo document this function

File

package/hosting_package.module, line 225
Defines package node types

Code

function hosting_get_packages_by_type($type) {
  $result = db_query("SELECT nid FROM {hosting_package} WHERE package_type = :package_type", array(
    ':package_type' => $type,
  ));
  if ($nid = $result
    ->fetchField()) {
    return node_load($nid);
  }
  return FALSE;
}