PHP code example of koine / query-registry

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

    

koine / query-registry example snippets


$registry = new \Koine\QueryRegistry;

$registry->register("SELECT foo FROM bar");

$registry->register("SELECT foo FROM bar WHERE baz=:baz", array(
    'baz' => 'somevalue'
));

$registry->getQueries()->last()->dump();


// or

foreach ($registry->getQueries() as $query) {
    $db->execute($query->getSql(), $query->getParams());
}