How do I query a content type with custom fields in the 'condition' statement
You'd be better off using an EntityFieldQuery for this:

$query = new EntityFieldQuery;
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'myContentType')
  -&gt;propertyCondition('status', 1) // in case you need it
  -&gt;fieldCondition('field_customfield3', 'value', $user-&gt;uid)
  -&gt;fieldCondition('field_customfield4', 'value', $anemailaddress);

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

if (isset($results['node'])) {
  $nodes = node_load_multiple(array_keys($results['node']));

  foreach ($nodes as $node) {
    $customerfield1 = field_get_items('node', $node, 'field_customerfield1');
    $first_value = $customerfield1[0]['value'];

    // etc...
  }
}


Even though it's more code, and more overhead, it has advantages over going into the database tables directly.


You don't need to make the JOINs yourself
EntityFieldQuery respects node revisions, which will be harder to keep track of well using a custom query
Your code is now portable if you decide to change the storage backend for fields to something other than MySQL (MongoDB for example).