Skip to content

Instantly share code, notes, and snippets.

Ron Cemer roncemer

Block or report user

Report or block roncemer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@roncemer
roncemer / FailoverPDO.php
Last active Jun 13, 2019
PHP PDO class with lazy connect and fail-over to alternate database servers
View FailoverPDO.php
<?php
class FailoverPDO extends PDO
{
protected $dsns, $failoverDSNIdx, $username, $passwd, $options, $connectCallback;
public $logConnectFailures = true;
protected $attrs = [];
protected $connectAttempted = false;
You can’t perform that action at this time.