English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Izit possible to join 2 or more database using asp or php coding.. gimme some light here..

2006-06-27 17:22:13 · 2 answers · asked by fTy 1 in Computers & Internet Programming & Design

2 answers

certain databases like mysql achieves this by using the dot operator "."
say db1 has table1(field1) and
db2 has table2(field2)then

select a.*,b.* from db1.table1 a,db2.table2 b where
a.field1 = b.field2

2006-06-27 22:03:38 · answer #1 · answered by kanna 3 · 0 0

depends on what you want to do.

if there is data in two separate DBs that you want to fetch separately and then in your code do some processing to merge/join them, then just create separate connections to each database and use them individually to fetch the data and process it in your asp/php code.

if you need to do the join within the DBs themselves (due to the nature of the data, or size of the possible result or something like that) then you need to make sure that you can establish a connection from one DB to the other DB itself, (which isn't always the case, sometimes you need your application to act as a bridge between the two because of permissions, firewalls, etc)

2006-06-28 00:31:48 · answer #2 · answered by noshyuz 4 · 0 0

fedest.com, questions and answers