MDB::setOptions & singleton

From: Date: Tue, 20 Jan 2004 09:14:16 +0000
Subject: MDB::setOptions & singleton
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10230@lists.php.net to get a copy of this message
Hello everyone, I have 2 questions about MDB 1) Is this the right way to use the MDB::setOptions method? It seems to work... $this->connection = MDB::connect($dsn); MDB::setOptions($this->connection, array('optimize'=>'portability')) ; Is this set once forever Or do I need to set the option every time I instanciate a new connection? 2) what exactly is the benefit of using the sigleton method? Is this working between classes? My root class instanciates a MDB object, and all children classes do a connection to any of 3 databases. Can I reuse the connections accross classes? What happen if I call a close() in one class? Thank you Vincent

« previous php.pear.general (#10230) next »