Skip to content

Asynchronous & non-blocking MySQLi driver for React.PHP

License

Notifications You must be signed in to change notification settings

pahenrus/react-mysqli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React MySQLi

Asynchronous & non-blocking MySQLi driver for React.PHP.

Require php-mysqlnd extension

Install

composer require pahenrus/react-mysqli

Example

$loop = \React\EventLoop\Factory::create();

$makeConnection = function () {
    return mysqli_connect('localhost', 'vagrant', '', 'test');
};

$mysql = new \React\MySQLi\Client($loop, new \React\MySQLi\Pool($makeConnection, 10));

$mysql->query('select * from test')->then(
    function (\React\MySQLi\Result $result) {
        print_r($result->all());
    },
    function ($error) {
        error_log($error);
    }
);

$loop->run();

About

Asynchronous & non-blocking MySQLi driver for React.PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%