PHP code example of michabbb / php-crate

1. Go to this page and download the library: Download michabbb/php-crate 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/ */

    

michabbb / php-crate example snippets


$APIURL = "/_sql?pretty";
$POOL   = "http://127.0.0.1:4200,http://127.0.0.1:4201,http://127.0.0.1:4202";
$SQL    = "select id from test";

$CRATE = new crate($POOL,$APIURL);
$result = $CRATE->sql($SQL);
shell
vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --colors tests/SelectTest.php --verbose --debug