When connecting to multiple MySQL servers, a link ID must be generated. : mysql_connect « MySQL Database « PHP






When connecting to multiple MySQL servers, a link ID must be generated.

 
For example:

<?
    $link1 = @mysql_connect("www.somehost.com", "web", "abcde") or die("Could not connect to MySQL server!");
    $link2 = @mysql_connect("www.someotherhost.com", "usr", "secret") or die("Could not connect to MySQL server!");
?>
  
  








Related examples in the same category

1.A function to open a connection to mysql
2.Connecting to a MySQL Database
3.Connecting user
4.Creating databases