Jump to content

Archived

This topic is now archived and is closed to further replies.

dragonusthei

Can you connect to two mysql databases at the same time?

Recommended Posts

yes - just use two (or even more) handles for each DB you're connecting to.

[code]
$first_db = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$second_db = mysql_connect('localhost', 'mysql_user2', 'mysql_password2');
[/code]

and use them as normal.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.