neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

Query with parameters error? #61

Closed sfdreverman closed 8 years ago

sfdreverman commented 8 years ago

Should this work?

return $this->neo4j->sendCypherQuery('MATCH (n:{ myType }) RETURN n ORDER BY n.name',['myType' => $myParam]);

Where $this is the php neo4j object and $myParam is the parameter passed into the function.

Because if it does, this will give an error message at position 10 (the { in the query). So my suspicion is that the parameter is not parsed.

ikwattro commented 8 years ago

Sorry for not seeing this, I haven't been notified :(

So, no this will not work, because Cypher doesn't accept dynamic labels, main reason is query caching.