You are here

function _ad_channel_load_nid_channels in Advertisement 6.2

Same name and namespace in other branches
  1. 6.3 channel/ad_channel.module \_ad_channel_load_nid_channels()

Return array of current channels for node

2 calls to _ad_channel_load_nid_channels()
_ad_channel_load_node in channel/ad_channel.module
Load channels associated with specified node.
_ad_channel_validate_nodes in channel/ad_channel.module
Be sure that the enabled channels actually can be enabled.

File

channel/ad_channel.module, line 675
Ad Channel module.

Code

function _ad_channel_load_nid_channels($nid) {
  $result = db_query('SELECT chid FROM {ad_channel_node} WHERE nid = %d', $nid);
  $output = array();
  while ($chid = db_fetch_object($result)) {
    $output[$chid->chid] = $chid->chid;
  }
  return $output;
}