lopes_andre Posted April 4, 2009 Share Posted April 4, 2009 Hi, I'am doing a script that handle with 2 databases in MySQL. Can I do selects like this: select * from database1.users Or I must have to open and close the database connection? Best Regards, André. Link to comment https://forums.phpfreaks.com/topic/152554-solved-how-to-make-querys-for-more-than-one-database/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 4, 2009 Share Posted April 4, 2009 If all your databases are on the same database server and use the same username/password, you only need one connection to the database server. You can then either select the database you want or list it in the query like you have shown. Link to comment https://forums.phpfreaks.com/topic/152554-solved-how-to-make-querys-for-more-than-one-database/#findComment-801244 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.