1. Go to this page and download the library: Download los/uql 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/ */
los / uql example snippets
$builder = new ZendDbBuilder($select, 'query', 'hint');
public function handle(ServerRequestInterface $request): ResponseInterface
{
$select = new \Laminas\Db\Select('table');
$select = (new ZendDbBuilder($select))->fromRequest($request);
$statement = $sql->prepareStatementForSqlObject($select);
$results = $statement->execute();
}
public function handle(ServerRequestInterface $request): ResponseInterface
{
$queryParams = $request->getQueryParams();
$query = $queryParams['q'] ?? [];
$hint = $queryParams['h'] ?? [];
$select = new \Laminas\Db\Select('table');
$select = (new ZendDbBuilder($select))->fromParams($query, $hint);
$statement = $sql->prepareStatementForSqlObject($select);
$results = $statement->execute();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.