question

swarner22 avatar image
swarner22 asked

If I have a php database connection established

If I have a php database connection established in a file on a project name database.php and I am using require_once(' database.php'); on whatever other files I want to establish that connection with, Can I set up multiple database connections in that database.php file and assign each one to its own PDO and use them through the same require_once connection, allowing me to use whatever database I need throughout a file by there distinct PDO name, allowing me to pull data from many other databases perhaps combing them on a php file?
sqlsql-serverdatabasephp
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Do you want every page to connect to every database?
0 Likes 0 ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.