Multiple MYSQL Database Connection in PHP
Do you want to make a MYSQL connection with multiple database in PHP? I am working on project where i need to use two database. I prefer not to make separate MYSQL connection for two database if both database is on same server and accessible by same user. You can simply use the database name before table name. Look at below code.
$sql = "SELECT * FROM db1.tbl, db2.tbl";
Let me know if you find any problem.