EntityFieldQuery causing column not found PDO exception I have a very simple node type set up in drupal, see it here

And I'm trying to get the node id based on the email field (the email is unique to each node, just like the nid). My query looks like this:

$query  -&gt; entityCondition('entity_type', 'node')
-&gt; entityCondition('bundle', 'mail_entry')
-&gt; fieldCondition('field_email', 'value', $email);


But drupal is complaining with: 


  "PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_email0.field_email_value'"


I don't really understand what's wrong.
At a guess you're using the Email Field module to provide that particular field?

If so, the column name is email, not value, so your code should be:

$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'mail_entry')
  -&gt;fieldCondition('field_email', 'email', $email);