PHP code example of nordicalf / clickhouse-doctrine

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

    

nordicalf / clickhouse-doctrine example snippets


# .env
###< clickhouse ###>
CLICKHOUSE_IP=127.0.0.1
CLICKHOUSE_DB=your_db
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=your_password
CLICKHOUSE_PORT=8123
CLICKHOUSE_CONSOLE_PORT=9000

$conn = $this->get('doctrine.dbal.clickhouse_connection');