PHP code example of mper / cypher-querybuilder
1. Go to this page and download the library: Download mper/cypher-querybuilder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mper / cypher-querybuilder example snippets
use MP\Cypher\QueryBuilder;
$qb = new QueryBuilder();
$qb->addMatch()
->addNode('u', 'user')
->relation()->right()
->node('n');
$qb->where()->expr("u.name = 'foo'");
$qb->skip(10);
$qb->limit(10);
echo $qb->getQuery('u', 'n');
// MATCH (u:user)-[]->(n) WHERE u.name = 'foo' RETURN u,n SKIP 10 LIMIT 10