ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:userguide:learn_multidatabase:connections

This is an old revision of the document!


Connecting to Multiple Databases

ADOdb can control unlimited independent connections because each connection is controlled completely separately.

The connections can be multiple connections to the any type of database.

/*
* Only one instance of common code need to be loaded
*/
include 'adodb/adodb.inc.php'; 
 
/*
* Establish connection to 2 mysql databases
*/
$conn1 = newAdoConnection('mysqli');
$conn2 = newAdoConnection('mysqli');
 
/*
* Add an additional connection to oracle
*/
$conn3 = newAdoConnection('oci8');
v5/userguide/learn_multidatabase/connections.1458352606.txt.gz · Last modified: 2017/04/21 11:40 (external edit)