You are here

function hosting_get_sites_by_status in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_get_sites_by_status()
  2. 7.4 site/hosting_site.module \hosting_get_sites_by_status()
  3. 7.3 site/hosting_site.module \hosting_get_sites_by_status()

Retrieve sites on a specific platform, with a specific status

File

site/hosting_site.module, line 486

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;
}