v5:userguide:learn_multidatabase:connections
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| v5:userguide:learn_multidatabase:connections [2016/03/19 02:30] – created mnewnham | v5:userguide:learn_multidatabase:connections [2017/04/18 11:07] (current) – Fix broken link dregad | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | <- ^ v5: | ||
| + | ~~NOTOC~~ | ||
| + | ====== Connecting to Multiple Databases ====== | ||
| + | ADOdb can control unlimited independent connections because each connection is controlled completely separately. | ||
| - | ===== Connecting to Multiple Databases ===== | + | The connections can be multiple |
| - | In this example we maintain | + | |
| <code php> | <code php> | ||
| + | /* | ||
| + | * Only one instance of common code need to be loaded | ||
| + | */ | ||
| + | include ' | ||
| - | include ' | + | /* |
| - | + | * Establish connection | |
| - | $conn1 = adoNewConnection('mysql' | + | */ |
| - | $conn2 = adoNewConnection(' | + | $conn1 = newAdoConnection('mysqli'); |
| - | + | $conn2 = newAdoConnection('mysqli'); | |
| - | $conn1-> | + | |
| - | $conn2-> | + | |
| - | + | ||
| - | $conn1-> | + | |
| - | $conn2-> | + | |
| + | /* | ||
| + | * Add an additional connection to oracle | ||
| + | */ | ||
| + | $conn3 = newAdoConnection(' | ||
| </ | </ | ||
| - | |||
v5/userguide/learn_multidatabase/connections.1458351049.txt.gz · Last modified: (external edit)
