I need to select nodes (1) of a certain content type and (2) satisfying a test against a custom field's value. Pseudo-code would be:
select all nodes of type TYPE_X which are published and where MY_FIELD = 'x'
I tried that with the EntityFieldQuery suggested here: How do I query a content type with custom fields in the 'condition' statement but Drupal/php crashes with "Fatal error: Allowed memory size of x bytes exhausted..."
So - what would be the correct code to use? I would appreciate a query which takes revisions into account.