Load all nodes by type


  $nids = db_select('node', 'n')
  ->fields('n', array('nid'))
  ->condition('n.type', 'NODE_TYPE')
  ->execute()->fetchCol();
  
  $nodes = node_load_multiple($nids);


 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.