1. Go to this page and download the library: Download abdulelahragih/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/ */
abdulelahragih / querybuilder example snippets
$pdo = # your pdo connection
$qb = new \Abdulelahragih\QueryBuilder\QueryBuilder($pdo)
# Now you can start using it
$result = $qb->table('users')
->select('id', 'username', 'phone_number', 'gender')
->where('role_id', '=', 1)
->join('images', 'images.user_id', '=', 'users.id')
->get();
$result = $qb->table('users')
->join('images', function (JoinClauseBuilder $builder) {
$builder->on('images.user_id', '=', 'users.id');
// you can use all where variants here
$builder->where('images.user_id', '=', 1);
})
->get();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.