php mysqli connect to two databases pdo

Solutions on MaxInterview for php mysqli connect to two databases pdo by the best coders in the world

showing results for - "php mysqli connect to two databases pdo"
Alma
09 Jun 2018
1$conn1 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);
2$conn2 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);
3
4$conn1->query("SELECT * FROM table");
5$conn1->query("SELECT * FROM table");
6