PHP code example of inanepain / db

1. Go to this page and download the library: Download inanepain/db 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/ */

    

inanepain / db example snippets


$qb = new SQLQueryBuilder();
$query = $qb
    ->select('users', ['name', 'email', 'password'])
    ->where('age', 18, '>')
    ->where('age', 30, '<')
    ->limit(10, 20);


echo "-- Testing MySQL query builder:\n";
echo $qb->getSQLFor(new MysqlQueryBuilder());

echo "\n\n";

echo "-- Testing PostgresSQL query builder:\n";
echo $qb->getSQLFor(new PostgresQueryBuilder());