making a select on 2 diffrent DB

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

making a select on 2 diffrent DB

Post by pelegk2 »

i have 2 diffrent DB
1 calles prod an have a table that called user
and another db called com with a table called users
and i want to check which user appear on them both!
is it possible to do it?
thnaksi nadvance
peleg
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

from MYSQL wrote:You can refer to a table within the current database as tbl_name (within the current database), or as db_name.tbl_name to explicitly specify a database. You can refer to a column as col_name, tbl_name.col_name, or db_name.tbl_name.col_name. You need not specify a tbl_name or db_name.tbl_name prefix for a column reference unless the reference would be ambiguous. See section 10.2 Database, Table, Index, Column, and Alias Names for examples of ambiguity that require the more explicit column reference forms.
I use this notation just in case a customer drops a whole new database on me. Again.
Post Reply