1. Go to this page and download the library: Download girgias/query-builder 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/ */
girgias / query-builder example snippets
$query = (new \Girgias\QueryBuilder\Select('demo'))
->limit(10, 20)
->order('published_date')
->getQuery();
$start = new \DateTime('01/01/2016');
$end = new \DateTime('01/01/2017');
$query = (new \Girgias\QueryBuilder\Select('demo'))
->select('title', 'slug')
->selectAs('name_author_post', 'author')
->whereBetween('date_published', $start, $end)
->order('date_published', 'DESC')
->limit(25)
->getQuery();
sql
SELECT title, slug, name_author_post AS author FROM demo WHERE date_published BETWEEN '2016-01-01 00:00:00' AND '2017-01-01 00:00:00' ORDER BY date_published DESC LIMIT 25
sql
SELECT * FROM demo WHERE (author = :author OR editor = :editor)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.