vendredi 8 mai 2015

Connect to database after creating the PDO object [duplicate]

This question already has an answer here:

If I connect to a mysql database using the following code:

$dbh = new PDO("mysql:host=$host", $root, $root_password);

As you can see the code doesn't provide the database name so I can create one, but can I make a connection to the created database later in the code?

Aucun commentaire:

Enregistrer un commentaire