【发布时间】:2015-08-13 20:09:55
【问题描述】:
我使用了以下命令行:
:POST /db/data/transaction/commit {"statements":[{"statement":"match n return n"}]}
当我将此查询设置为 PHP 变量时,我收到以下错误:
Fatal error: Uncaught exception 'Neoxygen\NeoClient\Exception\Neo4jException' with message 'Neo4j Exception with code "Neo.ClientError.Statement.InvalidSyntax" and message "Invalid input ':' in C:\wamp\www\PhpProjectNeo4j1\vendor\neoxygen\neoclient\src\Extension\AbstractExtension.php on line 88
能否请您解释一下如何在 PHP 中添加此命令?
【问题讨论】:
-
你的代码现在是什么样子的?给你这个异常的 PHP 代码是什么?
-
另外,您是否按照异常提示查看了 AbstractExtension.php 的第 88 行?
-
我现在的代码是:
$queryx = ":POST /db/data/transaction/commit {\"statements\":[{\"statement\":\"match n return n\"}]}"; $resultx = $client->sendCypherQuery($queryx)->getResult(); -
在第 88 行,我有以下代码:` public function checkResponseErrors($response) { if (isset($response['errors']) && !empty($response['errors']) ) { throw new Neo4jException(sprintf('Neo4j Exception with code "%s" and message "%s"', $response['errors'][0]['code'], $response['errors'][0 ]['信息'])); } } `
-
@jjaderbeg 如果您知道任何可以使用 PHP 从 Neo4j 数据库中导出 Json 文件的方法,请告诉我