Updated for use with the PDO class, according to PSR standards

Not tested yet, if you could do the honours ;)