tommyknocker / pdo-database-class

PHP PDO Wrapper which utilizes PDO and prepared statements
GNU Lesser General Public License v3.0
69 stars 46 forks source link

Correct the read me #11

Open nousename opened 4 years ago

nousename commented 4 years ago

This does not work

$db = new PDODb('host', 'username', 'password', 'databaseName'); It maps the parameters to the incorrect parts, the type is missing. Which means it maps host to type

This works $db = new PDODb('mysql', DBHost, DBUser, DBPassword, DBName);

This does $db = new PDODb(['type' => 'mysql', 'host' => DBHost, 'username' => DBUser, 'password' => DBPassword, 'dbname'=> DBName, 'port' => 3306, 'prefix' => '', 'charset' => 'utf8']);