Reputation: 19
What I want is that: I have two nodes with id 1 and id 2. It has a relationship type (id:1)-[r:Knows]->(id:2)
. My query is working fine in Neo4j as localhost but I am not able to store that relationship type in a PHP variable to use further. I am using graphware.
Note: $id = 1 and $s_id = 2.
$queryString = "MATCH (a:signup{iid:'$id'})-[r]->(b:signup{iid:'$s_id'}) return type(r) ";
$query = new Everyman\Neo4j\Cypher\Query($client, $queryString);
$result = $query->getResultSet();
if($result == 'Knows')
{
$s_relation = $result;
}
else
{
$s_relation = 'empty';
}
It returns the else part as EMPTY.
Thank you.
Upvotes: 0
Views: 91