function hosting_get_sites_by_status in Hosting 5
Same name and namespace in other branches
- 6.2 site/hosting_site.module \hosting_get_sites_by_status()
- 7.4 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()
File
- site/
hosting_site.module, line 114
Code
function hosting_get_sites_by_status($platform, $status) {
$nodes = array();
$result = db_query("SELECT nid FROM {hosting_site} WHERE platform=%d AND status = %d", $platform, $status);
while ($nid = db_fetch_object($result)) {
$nodes[$nid->nid] = node_load($nid->nid);
}
return $nodes;
}