neo4j - Cypher: Passing multiple parameters in WHRE IN -
neo4j - Cypher: Passing multiple parameters in WHRE IN -
how pass parameters condition?
that is, works fine:
match (b:book) b.guid={guid} homecoming b;
but, how pass multiple guids parameters query:
match (b:book) b.guid in [guid1,guid2,gid3] homecoming b;
i using neo4jphp client, code this:
$client = new everyman\neo4j\client( "neo4j server address", "7474" ); $result = new everyman\neo4j\cypher\query( $client, "match (b:book) b.guid={guid} homecoming b", array('guid'=>$guid1) ); $res = $result->getresultset();
you should pass array parameters, query :
match (b:book) b.guid in {mymap} homecoming b; $client = new everyman\neo4j\client( "neo4j server address", "7474" ); $result = new everyman\neo4j\cypher\query( $client, "match (b:book) b.guid in {mymap} homecoming b", array('mymap'=> array($guid1, $guid2, $guid3)) ); $res = $result->getresultset();
neo4j cypher neo4jphp
Comments
Post a Comment