qipilangabc / mysql-async

Async mysql client for PHP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mysql-async

Async mysql client for PHP.

Install

  1. compile swoole with --enable-async-mysql
  2. git clone https://github.com/swoole/mysql-async

Usage

$config = array(
    'host' => '127.0.0.1',
    'user' => 'root',
    'password' => 'root',
    'database' => 'test',
);
$pool = new Swoole\Async\MySQL($config, 100);
for($i = 0; $i < 10000; $i++)
{
    $pool->query("show tables", function($mysqli, mysqli_result $result){
        var_dump($result->fetch_all());
    });
}

About

Async mysql client for PHP.


Languages

Language:PHP 100.0%