1. Go to this page and download the library: Download hectororm/query 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/ */
hectororm / query example snippets
use Hector\Connection\Connection;
use Hector\Query\QueryBuilder;
$connection = new Connection('...');
$queryBuilder = new QueryBuilder($connection);
$result = $queryBuilder
->select('table')
->where('field1', 'foo')
->where('field2', '>=', 2)
->fetchAll();
use Hector\Query\Select;
use Hector\Query\Insert;
use Hector\Query\Update;
use Hector\Query\Delete;
use Hector\Query\Union;
$select = new Select();
$insert = new Insert();
$update = new Update();
$delete = new Delete();
$union = new Union();
use Hector\Connection\Connection;
use Hector\Connection\Bind\BindParamList;
use Hector\Query\Select;
$connection = new Connection('...');
$select = new Select();
$select
->from('table')
->where('field', 'value');
$binds = new BindParamList();
$statement = $select->getStatement($binds);
$result = $connection->fetchAll($statement, $binds);