function hosting_get_sites_by_status in Hosting 7.4
Same name and namespace in other branches
- 5 site/hosting_site.module \hosting_get_sites_by_status()
- 6.2 site/hosting_site.module \hosting_get_sites_by_status()
- 7.3 site/hosting_site.module \hosting_get_sites_by_status()
Retrieve sites on a specific platform, with a specific status
1 call to hosting_get_sites_by_status()
- hosting_platform_update in platform/
hosting_platform.module - Implements hook_update().
File
- site/
hosting_site.module, line 536 - Contains hook implementations for Hosting site module.
Code
function hosting_get_sites_by_status($platform, $status) {
$nodes = array();
$result = db_query("SELECT nid FROM {hosting_site} WHERE platform = :platform AND status = :status", array(
':platform' => $platform,
':status' => $status,
));
while ($nid = $result
->fetch()) {
$nodes[$nid->nid] = node_load($nid->nid);
}
return $nodes;
}