knowram Posted November 1, 2007 Share Posted November 1, 2007 is it possible to select multiple databases from the same server? Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 1, 2007 Share Posted November 1, 2007 Yes. You can even join them in a single query. Specify table names as dbname.tablename. mysql_connect ($server, $user, $pwd); $res = "SELECT a.col1, b.col2 FROM db1.table1 as a JOIN db2.table2 as b ON a.col2 = b.col2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.