DB.PHP - PHP ORM

Connect using many links

First init database

$database = new \db\database ();

Or first init database with default database name:

$database = new \db\database ('my_default_db_name');

It is assumed that this database is located on first connection link you ever establish (Or even located on any link for tables without database name specification).

Than add links as many as you wish:

$database->link (new \db\link ('my_mysql_link', 'mysql:host=127.0.0.1', 'my_user', 'my_pass'));
$database->link (new \db\link ('my_odbc_link', 'odbc:my_odbc_alias', 'my_user', 'my_pass'));

**Note that you can specify custom links to tables also custom databases to tables. By default table without link specification is located on default link. Table without database specification is located in default database.

Additional link usage samples https://github.com/hazardland/db.php/blob/master/samples/002.link.php