PHP code example of digphp / database

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

    

digphp / database example snippets

 php
$config = [
    'master'=>[...],
    'slave'=>[[...],[...],...]
];

$db = new \DigPHP\Database\Db($config);
$db->master()->insert delete ...;
$db->slave()->get select ...;
$db->get(...);
$db->select(...);
$db->delete(...);
// 更多方法请参考 (Medoo)[https://github.com/catfan/Medoo]