Query fieldCondition for custom content type I am attempting to query a custom content type called players (machine name) in a Drupal 7 module and it seemed to be working fine up until an hour ago. Nothing has changed on my side but now the 'Select' works ( with no fieldCondition, but when I add a fieldCondition I am getting empty results.

Here is my query:

$query = new EntityFieldQuery;
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'players')
  -&gt;fieldCondition('field_email_address', 'value', $email_address)
  -&gt;fieldCondition('field_password', 'value', $password)
  -&gt;range(0, 1);

$results = $query-&gt;execute();


I have verified and reverified the bundle name, each machine name for the fields, and the values being passed in, but when I dump and die the query results, they come up empty.

Any ideas?
Assuming you're using the Email field module, the column name is email, rather than value.

If that's the case, just change that line to:

-&gt;fieldCondition('field_email_address', 'email', $email_address, '=')


You may need to make a similar change for the password field, depending on what type it is. The easiest way to check for valid column names is in the .install file of the module that provides it, within its implementation of hook_field_schema().