Answers for "php mysqli connect to two databases pdo"

PHP
0

php mysqli connect to two databases pdo

$conn1 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);
$conn2 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);

$conn1->query("SELECT * FROM table");
$conn1->query("SELECT * FROM table");
Posted by: Guest on August-25-2021

Browse Popular Code Answers by Language