2017 © Pedro Peláez
 

library php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

image

rlanvin/php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

  • Wednesday, March 15, 2017
  • by rlanvin
  • Repository
  • 1 Watchers
  • 4 Stars
  • 746 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

MyPDO

MyPDO is a wrapper that adds a few features missing from vanilla PDO: - Explicit disconnection - Automatic reconnection (no more 2006 MySQL server has gone away) - Nested transactions - Methods chainability - Hidden password from the stack trace (in case of error) - Helpers methods (e.g. ping()), (*1)

Important: MyPDO is designed for MySQL only., (*2)

This class will not add higher logic to PDO (such as data mapping, etc.). It is only intended to add low-level features., (*3)

Build Status, (*4)

Basic example

This class is intented to be a drop-in replacement for PHP's default PDO. There is nothing special to do, just use MyPDO class instead of PDO and you're good to go., (*5)

Complete doc is available in the wiki., (*6)

Requirements

  • PHP >= 5.3

Installation

The recommended way is to install the lib through Composer., (*7)

Just add this to your composer.json file (change the version by the release you want, or use dev-master for the development version):, (*8)

{
    "require": {
        "rlanvin/php-mypdo": "1.*"
    }
}

Then run composer install or composer update., (*9)

Now you can use the autoloader, and you will have access to the library:, (*10)

<?php
require 'vendor/autoload.php';

Alternative method

You can just download src/MyPDO.php and src/MyPDOStatement.php (if you want to use prepared statements) and require them., (*11)

Documentation

Complete doc is available in the wiki., (*12)

Contribution

Feel free to contribute! Just create a new issue or a new pull request., (*13)

License

This library is released under the MIT License., (*14)

The Versions

15/03 2017

dev-master

9999999-dev https://github.com/rlanvin/php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

02/03 2016

v1.0.2

1.0.2.0 https://github.com/rlanvin/php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

14/10 2015

v1.0.1

1.0.1.0 https://github.com/rlanvin/php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

17/08 2015

v1.0.0

1.0.0.0 https://github.com/rlanvin/php-mypdo

Wrapper for PDO (MySQL) to support auto-reconnect, nested transactions and more.

  Sources   Download

MIT

The Requires

  • php >=5.3.0