Re: New PDO-based DBAL/ORM for PEAR2
| From: | Michael J. I. Jackson | Date: | Wed, 21 Nov 2007 18:22:41 +0000 |
| Subject: | Re: New PDO-based DBAL/ORM for PEAR2 | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48558@lists.php.net to get a copy of this message | ||
On Nov 21, 2007, at 10:29 AM, Bertrand Mansion wrote:
Le 21 nov. 07 à 17:24, Michael J. I. Jackson a écrit :I agree it's easier. But I just remembered something: PDO already lets you use aliases in place of a DSN! The only downside is that you have to set them up in your php.ini. And since the parameters passed to PDORM::factory() are passed directly to the PDO constructor, those will still work. Do you think this is a reasonable alternative? MichaelSo I can either manage a list of connection aliases in my head, or I can let PDORM do it for me and just use PDORM::singleton(). I personally think the latter is easier and requires less work on my part.That's personal I guess, since I find it easier to remember an alias like 'db1' or 'db2' than my password :)