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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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