voila
voila

Reputation: 1666

Neo4j php: Unable to delete node through Cypher

I am not able to delete a node using neo4php(using cypher api) .

Here is small code of mine:

$client = new Everyman\Neo4j\Client();
$queryString = "START n = node(*) return n";
$query = new Everyman\Neo4j\Cypher\Query($client, $queryString);
$result = $query->getResultSet();

foreach ($result as $row) {
    $id = $row['n']->getId();
    $deletequery = "START node = node(".$id.")" 
    ." Delete node";
    $query = new Everyman\Neo4j\Cypher\Query($client, $deletequery);

Upvotes: 1

Views: 603

Answers (1)

voila
voila

Reputation: 1666

I got the answer . Actually after deleting the node , i have to fetch the result using $query->getResult

Upvotes: 1

Related Questions