1. Go to this page and download the library: Download braincrafted/arrayquery 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/ */
braincrafted / arrayquery example snippets
// Select the name of all of Ned's children older than 10.
$query = $qb->create()
->select('name')
->from([
[ 'name' => 'Robb', 'age' => 15 ],
[ 'name' => 'Sansa', 'age' => 11 ],
[ 'name' => 'Arya', 'age' => 9 ],
[ 'name' => 'Bran', 'age' => 7 ],
[ 'name' => 'Rickon', 'age' => 3 ]
])
->where('age', 10, '>');
$result = $query->findAll();
use Braincrafted\ArrayQuery\ArrayQuery;
use Braincrafted\ArrayQuery\SelectEvaluation;
use Braincrafted\ArrayQuery\WhereEvaluation;
use Braincrafted\ArrayQuery\Operator\EqualOperator
$query = new ArrayQuery(
new SelectEvaluation,
(new WhereEvaluation)->addOperator(new EqualOperator)
);
use Braincrafted\ArrayQuery\QueryBuilder;
$qb = new QueryBuilder;
$query = $qb->create();