PHP code example of clearsoft / easysql-common
1. Go to this page and download the library: Download clearsoft/easysql-common 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/ */
clearsoft / easysql-common example snippets
use Clearsoft\EasySQL\Common\SqlValidator;
use Clearsoft\EasySQL\Common\CredentialSanitizer;
$result = SqlValidator::validateSelectOnly('SELECT * FROM users LIMIT 10');
if (!$result['ok']) {
throw new RuntimeException($result['reason']);
}
echo CredentialSanitizer::sanitize('postgres://user:secret@host:5432/db');
// postgres://***@host:5432/db