Reputation: 462
I'm using neo4jphp to work with a neo4j database using PHP. It has this method for selecting a node from the database:
$select = $neo->getNode(4); // 4 is the node's id
However, I will not always know the id for the node I want. So is it possible to select a node by its property instead?
For example:
$select = $neo->getNode('name', 'Greg');
https://github.com/jadell/neo4jphp/wiki/Nodes-and-Relationships
Upvotes: 0
Views: 39
Reputation: 1555
You can do this using indexes, labels, or using Cypher queries. There is no built-in way in neo4jphp to query for nodes by property.
Also, neo4jphp is built for an earlier version of Neo4j. If you are using a more recent version of Neo4j, I would recommend using a more up-to-date library for connecting Neo4j to a PHP application: https://github.com/graphaware/neo4j-php-client
Upvotes: 2