コード例 #1
0
/**
 * change the active database-connection. all db-functions
 * are performed at the new connection.
 *
 * ATTENTION: the old connection is *not* closed!
 *
 **/
function changeDB($strIdentifier)
{
    $objDataObjectPool = new DataObjectPool('Database-Definition');
    $objNewDB = $objDataObjectPool->get($strIdentifier);
    $objDataObjectPool->delete('DEFAULT');
    $objDataObjectPool->add('DEFAULT', $objNewDB->getAll());
}