55 Unstar Star 96 Fork 35

韩天峰 / mysql-async

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

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());
    });
}

Comments ( 2 )

Sign in for post a comment

About

mysql-async 是基于 swoole 开发的 PHP 异步 MySQL 客户端,内置连接池和任务排队机制。基于 mysql-async 可以编写出纯异步、支持超高并发的 PHP 应用。 spread retract
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
PHP
1
https://git.oschina.net/matyhtf/mysql-async.git
git@git.oschina.net:matyhtf/mysql-async.git
matyhtf
mysql-async
mysql-async
master

Search