Check if a node exist where field_a = Sessionvalue && field_b=arg1 Hello I need a an if else statment to check if a node with 2 given field values exist.(1 value from a Session and 1 from an Url argument)

I dont need to load the node I only want to check if it exist.

thanks for your help.
If you want to get value from entity without loading the entity object. You can use EntityFieldQuery

Example:

$query = new EntityFieldQuery();

$query-&gt;entityCondition('entity_id', 1)  
      -&gt;fieldCondition('field_custom_field', 'value', '', '!=')
      -&gt;addMetaData('account', user_load(1)); // Run the query as user 1.

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

if (!empty($result['node'])) {
  // field value exists!.
}