Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://github.com/timcosgrove/efq_example/blob/master/efq_example.module
- http://treehouseagency.com/blog/neil-hastings/2011/09/06/building-energygov-without-views
- $query = new EntityFieldQuery();
- $query->entityCondition('entity_type', 'node')
- ->entityCondition('bundle', 'simplenews')
- ->entityCondition('entity_id', array(13), '=')
- ->range(0, 1);
- $result = $query->execute();
- if (isset($result['node'])) {
- $news_items_nids = array_keys($result['node']);
- $news_items = entity_load('node', $news_items_nids);
- }
- print_r($news_items);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement