How to use a between operator in an entity field query? I wanna use a between operator. Can anyone tell how to use this? I am using it like this

$query-&gt;propertyCondition('nid', array(4, 3), 'between');


But it is also including node id 4 and 3, and I want to show only "2", which falls in between. How can this be done?
If you want to include 2 then simply pass 2.

$query-&gt;propertyCondition('nid', array(2));


While using between operator, it includes the range values too. So you can just pass the range values you want to include. Still if you want to exclude these range then add one more condition like :

$query-&gt;propertyCondition('nid', array(1, 3), 'BETWEEN'); // 1, 3 to get the nid 2
$query-&gt;propertyCondition('nid', array(1, 3), 'NOT IN'); // exclude these nids