PHP code example of kristuff / patabase

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

    

kristuff / patabase example snippets


$database = new \Kristuff\Patabase\Database(['driver' => 'sqlite', 'database' => '/somewhere/database.db']); 
$database->select()
         ->column('customer.customerName')
         ->column('order.orderId')
         ->from('customer')
         ->innerJoin('order', 'customerId', 'customer', 'customerId')
         ->orderAsc('order.orderId')
         ->whereEqual('order.customerId', 222)
         ->getAll('json');