Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nids = array(
- '2' => '2',
- '145' => '145'
- );
- $query = db_select('node', 'n')
- ->fields('n', array('nid'));
- foreach ($nids as $nid) {
- $query->condition('nid', $nid, '!=');
- }
- $results = $query->execute();
Advertisement
Add Comment
Please, Sign In to add comment