romainbessugesmeusy/php-dsn-factory

There is no license information available for the latest version (dev-master) of this package.

DSN Factory for PDO

dev-master 2013-03-04 13:32 UTC

This package is not auto-updated.

Last update: 2024-11-17 03:16:25 UTC


README

Tired of going on http://php.net because you can't remember how's constructed the DSN you need ?

$dsn = new Dsn(Dsn::MYSQL, [
    "host" => "127.0.0.1",
    "port" => "3306",
    "dbname" => "my_database",
]);


$dsn = new Dsn(Dsn::SQL_SERVER, [
    "host" => "127.0.0.1",
    "port" => "3306",
    "dbname" => "my_database",
]);