Joined September 2015
·

jim005

France
·
·

Thanks for this article. Below my code :

$query2 = db_select('node', 'n');

// Gestion du multi-site
if (module_exists('domain')) {
  $domain    = domain_get_domain();
  $domain_id = $domain['domain_id'];
  $query2->innerJoin('domain_access', 'd', 'n.nid = d.nid');
  $query2->condition('d.gid', $domain_id, '=');
}

$query2->addField('n', 'nid');
$query2->condition('n.type', $ws_push_node_type, 'IN');
$query2->orderBy('n.created', 'DESC');
$query2->range(0, 50);
$query2->condition('n.status', 1);

$nids_data = $query2->execute()->fetchAll();
Achievements
1 Karma
0 Total ProTip Views