PHP code example of inglar / sql-builder
1. Go to this page and download the library: Download inglar/sql-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/ */
inglar / sql-builder example snippets
$builder = new SqlBuilder('pgsql');
$select = $builder->select()
->column('*')
->from('table')
->where('id = :id')
->bindParam(':id', 123);
echo $select;
print_r($select->getBindParams());
$builder = new SqlBuilder('pgsql');
$select = $builder->select()
->column('*')
->from('table')
->join($builder->join('table2', "table2.user_id = table.id")
->where('id = :id')
->bindParam(':id', 123);
echo $select;
print_r($select->getBindParams());