PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
changing the active database for my DSN

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
smack2



Joined: 30 Apr 2008
Posts: 1

PostPosted: Wed Apr 30, 2008 4:17 pm    Post subject: changing the active database for my DSN Reply with quote

Hello!

Could you please help me. I need to change the active Database used by my DSN:
Code:

$dsn_add  = "mysql://{$user}:{$pass}@{$server}/".DB_ONE;

$options = &PEAR::getStaticProperty('DB_DataObject','options');
$options = array(
    'database'         =>  $dsn_add ,
    'schema_location'  => './DataObjects', 
    'class_location'   => './DataObjects',   
    'require_prefix'   => './DataObjects/',
    'class_prefix'     => 'DataObjects_',
);


I'm looking for something like

Code:

function pear_selectOtherDB()
{ $options = &PEAR::getStaticProperty('DB_DataObject','database');
$options = array(
    'database'         =>  DB_TWO ,
 
);
}


Anyboy ideas how to switch between different databases?

Thank you.

Greetins,

Andrew[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software