これまで、私はneo4jとphp-clientグラフを認識していました。今私は(カウントを返すクエリを実行しよう)との情報をキャッチする方法を見つけることができないということまでは、私が実行したクエリは、次の機能である:graphawareは返されたcount()の値を取得します
function net_in_common($user, $other){
global $client;
$searchquery = "MATCH (a:user)-[r:IN_NET]->(b:user)<-[s:IN_NET]-(c:user) WHERE a.username = '" . $user . "' AND c.username = '" . $other . "' return count(DISTINCT b) as incommon";
$result = $client->run($searchquery);
return $result;
}
が、私はでそれをエコーしよう
$common = net_in_common($user1, $user2);
echo $common->value('incommon');
私は絶対に何も得られません、それはPHPコードを壊すエラーをディスパッチしますが、私は間違い自体を見つけることができません。
これは、count()の値を取得する方法とは異なる方法です。あなたの関数で