Drupal 7 has very promising ORM-like system of queries with EntityFieldQuery.
Currently, I understand how to make selection of nodes, but the result doesn't contain any specific information, like fileds, I'm looking for.
$query = new EntityFieldQuery(); $entities = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'event') ->propertyCondition('status', 1) ->fieldCondition('field_date', 'value', array('2011-03-01', '2011-03-31'), 'BETWEEN') ->fieldOrderBy('field_date', 'value', 'ASC') ->execute();
So we need to load entire data of nodes, if we would like to get only values of one field, for example 'field_date' in current example.
$nodes = entity_load('node', array_keys($entities['node']));
If there is a way to get the value of fields, instead to load full data of all nodes, as it provokes some memory overload.
$nodesFieldDates = ???