jadell / neo4jphp

PHP wrapper of the Neo4j REST interface
Other
532 stars 137 forks source link

How to bind the parameters seperately Neo4jPHP #131

Closed sarathsprakash closed 10 years ago

sarathsprakash commented 10 years ago

Hello , I have the following situation

        foreach($id as user_id)
       {
         $query="match (u:user{id:{user_id}})-[r:likes]->(b:product)
         return b";
        $result = new Everyman\Neo4j\Cypher\Query($client, $query,array('user_id' =>   $user_id));
        $data= $result->getResultSet(); 
        }  

I have to bind the parameters separately from loading the query.In the above code you will find the $result variable where I bind the parameters and load the query in one statement, I want binding the parameters to be done in a separate statement. Just like the prepared statement in mysql. Can it be done?

Please help, Thanks in advance

Here is the link to stackoverflow posting http://stackoverflow.com/questions/22270998/how-to-bind-the-parameters-seperately-neo4jphp

jadell commented 10 years ago

Please do not cross-post questions here and on SO. It clutters the issues list and distracts from bugs and pull requests. If you post on SO, expect an answer on SO.