PHP code example of easydowork / yii2-db
1. Go to this page and download the library: Download easydowork/yii2-db 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/ */
easydowork / yii2-db example snippets
easydowork\db\Connection;
use easydowork\db\Query;
$connect = new Connection([
'dsn' => 'mysql:host=127.0.0.1;dbname=test',
'username' => 'test',
'password' => 'test',
'charset' => 'utf8',
]);
$data = (new Query())->from('user')->all($connect);
print_r($data);
$connect->close();