Can you do queries against two databases if mysql_select_db was already used?

pkmyrd

New Member
I have code that in the connection setup selects the database using mysql_select_db().\[code\]$link = mysql_connect('localhost', 'user', 'pass');mysql_select_db("database1");\[/code\]Can I later run a query against two databases such as:\[code\]SELECT database1.row, database2.row FROM database1.table, database2.table WHERE database1.row = database2.otherrow\[/code\]even though "database1" was already selected at first? Or is there a method for unselecting the database?
 
Back
Top