function hosting_get_packages_by_type in Hosting 7.4
Same name and namespace in other branches
- 5 package/hosting_package.module \hosting_get_packages_by_type()
- 6.2 package/hosting_package.module \hosting_get_packages_by_type()
- 7.3 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;
}