Re: MDB::setOptions & singleton
| From: | Thierry Bothorel | Date: | Tue, 20 Jan 2004 13:26:55 +0000 |
| Subject: | Re: MDB::setOptions & singleton | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10242@lists.php.net to get a copy of this message | ||
One question about 'portability'
Has this option an effect when set in the Manager to create tables and
fields?
TB
--
Click below to answer / cliquez ci dessous pour me repondre
http://cerbermail.com/?MQkxTL4vUP
"Vincent Dupont" <Vincent.dupont@ausy.be> a écrit dans le message de
news:B25AE43B1720D711A8B300508BEF38BB0BDF0F@osexc.ausy.be...
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