简体   繁体   English

如何分别绑定参数Neo4jPHP

[英]How to bind the parameters separately Neo4jPHP

I am new to Neo4j, I am using Everyman Neo4jPhp. 我是Neo4j的新手,正在使用Everyman Neo4jPhp。 I have the following situation 我有以下情况

foreach($id as user_id)
{
$query="match (u:user{id:{user_id}})-[r:likes]->(b:product)
        return b";
$result = new Everyman\Neo4j\Cypher\Query($client, $query,array('user_id' => $user_id));
$data= $result->getResultSet(); 
}  

I have to bind the parameters separately from loading the query.In the above code you will find the $result variable where I bind the parameters and load the query in one statement, I want binding the parameters to be done in a separate statement. 我必须将参数与加载查询分开单独绑定。在上面的代码中,您会找到$result变量,在其中我绑定参数并在一条语句中加载查询,我希望将参数绑定在单独的语句中。 Just like the prepared statement in mysql. 就像mysql中准备好的语句一样。 Can it be done? 能做到吗

这不是neo4jphp的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM