mysql - NOT IN for multi field DQL Doctrine2 -
i want know how in doctrine2
select e \entity e e.field1, e.field2 not in (select e2.field1, e2.field2 \entity e2 condition )
when or surround 2 fields parenthesis got error like:
queryexception: [syntax error] line 0, col 136: error: expected doctrine\orm\query\lexer::t_close_parenthesis, got ','
or:
queryexception: [syntax error] line 0, col 135: error: expected =, <, <=, <>, >, >=, !=, got ','
php code:
$query = $this->_em->createquery(' select r librairiebundle\entity\reseau r ( r.client1 = :me or r.client2 = :me ) , r.confirme = 1 , (r.client2, r.client1) not in ( select s.clientfrom, s.clientobject librairiebundle\entity\suggestclient s s.clientto = :cible ) ');
separate clause.
select e \entity e e.field1 not in (select e2.field1 \entity e2 condition ) , e.field2 not in (select e3.field2 \entity e3 condition )
Comments
Post a Comment