【问题标题】:How to bind the parameters separately Neo4jPHPNeo4jPHP如何分别绑定参数
【发布时间】:2014-03-08 15:08:31
【问题描述】:

我是 Neo4j 的新手,我正在使用 Everyman Neo4jPhp。我有以下情况

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(); 
}  

我必须将参数与加载查询分开绑定。在上面的代码中,您将找到$result 变量,我在其中绑定参数并在一个语句中加载查询,我希望绑定参数在一个语句中完成单独声明。就像mysql中的prepared statement一样。能做到吗?

【问题讨论】:

    标签: php neo4j cypher neo4jphp


    【解决方案1】:

    这还不是 neo4jphp 的特性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-18
      • 2012-12-02
      • 1970-01-01
      • 1970-01-01
      • 2014-02-08
      • 2018-02-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多