Download the PHP package fbf/mysql-reconnect without Composer
On this page you can find all versions of the php package fbf/mysql-reconnect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fbf/mysql-reconnect
More information about fbf/mysql-reconnect
Files in fbf/mysql-reconnect
Download fbf/mysql-reconnect
More information about fbf/mysql-reconnect
Files in fbf/mysql-reconnect
Vendor fbf
Package mysql-reconnect
Short Description A PDO wrapper that reconnects automatically and re-issues queries on receiving MySQL server timeout errors
License MIT
Package mysql-reconnect
Short Description A PDO wrapper that reconnects automatically and re-issues queries on receiving MySQL server timeout errors
License MIT
Please rate this library. Is it a good library?
Informations about the package mysql-reconnect
MySQL-Reconnect
A PDO wrapper that reconnects automatically and re-issues queries on receiving MySQL server timeout errors
Usage
$config = array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'mydb',
'user' => 'username',
'pass' => 'password',
);
$db = new Fbf\MysqlReconnect\Db($config);
$sql = "SELECT * FROM posts WHERE id = :id";
$data = array('id' => 1);
$sth = $db->query($sql, $data);
$post = $sth->fetchObj();
How it works
Uses __call() magic method to pass off methods called to the PDO connection object, so you can call whatever you like on $db and it will pass it off to PDO. Inside the magic method we catch timeout exceptions and then reconnect before re-issuing the query.
All versions of mysql-reconnect with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package fbf/mysql-reconnect contains the following files
Loading the files please wait ....