Are there any drawbacks to having multiple db connections?
Posted: Mon May 22, 2017 6:12 pm
I'm very slowly updating a legacy project to be php7 compliant.
There are many raw mysql_query calls, and functions that contain mysql_query, and primative poorly written models that use both.
I want to switch to either raw PDO or something like https://github.com/colshrapnel/safemysql or a stand-alone version of Laravel's Eloquent but I won't be able to update every part of the project all at once. This means most views will do both the original mysql_connect and the connection for the new library.
Are there any drawbacks or problems that arise from making 2 db connections in the same script?
There are many raw mysql_query calls, and functions that contain mysql_query, and primative poorly written models that use both.
I want to switch to either raw PDO or something like https://github.com/colshrapnel/safemysql or a stand-alone version of Laravel's Eloquent but I won't be able to update every part of the project all at once. This means most views will do both the original mysql_connect and the connection for the new library.
Are there any drawbacks or problems that arise from making 2 db connections in the same script?