1. Go to this page and download the library: Download sql/genericsqlformat 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/ */
sql / genericsqlformat example snippets
y
use sql\genericsqlformat\Select\Select;
//query
//enable debug mode
$select = new Select(true);
//no debug mode
$select = new Select();
$select->setFrom('users');
$select->setColumns(['id', 'nameuser']);
$select->setWhere(['id' => 1,'nameuser'=>'teste'],['nameuser'=>'=','id'=>'like'], ['OR']);
$select->setGroup(['id']);
$select->setOrder(['id']);
$select->setLimit(1);
$select->run();