1. Go to this page and download the library: Download ludal/mysql-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/ */
ludal / mysql-querybuilder example snippets
$builder = new QueryBuilder();
> $pdo = new PDO($dsn, $login, $password);
> $builder = new QueryBuilder($pdo);
>
$select->toSQL(); // returns 'SELECT * FROM users'
$select->fetchAll(); // returns the rows fetched from the db
$select->getStatement(); // get the PDO statement, useful for handling errors
$update->execute(); // executes the UPDATE query