Mysqli
安装
composer require easyswoole/mysqli
Client 用法
$config = new \EasySwoole\Mysqli\Config([
'host' => '',
'port' => 3300,
'user' => '',
'password' => '',
'database' => '',
'timeout' => 5,
'charset' => 'utf8mb4',
]);
$client = new \EasySwoole\Mysqli\Client($config);
go(function ()use($client){
//构建sql
$client->queryBuilder()->get('user_list');
//执行sql
var_dump($client->execBuilder());
});
需要调用execBuilder()才会执行