PHP code example of kambo / duckdb

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

    

kambo / duckdb example snippets


$database = new Kambo\DuckDB\Database();
$connection = new Kambo\DuckDB\Connection($database);

$connection->query('CREATE TABLE integers(i INTEGER, j INTEGER);');
$connection->query('INSERT INTO integers VALUES (3,4), (5,6), (7, NULL) ');

$result = $connection->query('SELECT * FROM integers;');

var_export($result->toArray());