view query alter : Subselects/query don't work with out brackets I was trying to alter a view query with a subselect that looks like:

$subquery1 = (db_select('users_roles', 'r')
   -&gt;where('r.uid = users_node__users_roles.uid and r.rid=10'));
$subquery1-&gt;addExpression('COUNT(r.rid)', 'rid');
$query-&gt;add_where(1,'1', $subquery1, '&lt;&gt;');


where $query is the main query.
But when i run the view, the query


  ...AND (1 &lt;> SELECT COUNT(r.rid) AS rid FROM users_roles r WHERE 
  (r.uid = users_node__users_roles.uid and r.rid=10))...


if i put brackets for the sub select query it will working fine.
ie;


  ...AND (1 &lt;> (SELECT COUNT(r.rid) AS rid FROM users_roles r WHERE 
  (r.uid = users_node__users_roles.uid and r.rid=10)))...


So my question is;
How can i put the subquery inside brackets?
sorry if my question is stupid?

Thanks in advance,
PREM
I had found the soln myself; put NOT IN instead of &lt;>.
NOT IN will make the value part inside the brackets