PHP code example of semperton / query
1. Go to this page and download the library: Download semperton/query 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/ */
semperton / query example snippets
$queryFactory = new QueryFactory();
$userSelect = $factory->select('user')->limit(5);
$sql = $userSelect->compile($params); // $params is passed by reference
$pdo = new PDO('dsn');
$stm = $pdo->prepare($sql);
$stm->execute($params);
$users = $stm->fetchAll();
// ...