Jump to content

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


dragonusthei

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.

Archived

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

×
×
  • Create New...

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.