Why is it not an if() statement?

> -----Original Message-----
> From: Ben Ramsey [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 26, 2007 10:38 AM
> To: internals@lists.php.net
> Subject: [PHP-DEV] [PATCH] Generate warning when using
> PDO::setAttribute() and ATTR_PERSISTENT
> 
> For a while, we were scratching our heads over why persistent
> connections were not being created when using PDO_OCI, even though we
> were explicitly calling PDO::setAttribute() to set
> PDO::ATTR_PERSISTENT.
> 
> My colleague Brian DeShong further explains the issue on his blog:
> http://www.deshong.net/?p=61
> 
> "You must set PDO::ATTR_PERSISTENT => true in the array of options you
> pass to the PDO constructor! If you call $pdo-
> >setAttribute(PDO::ATTR_PERSISTENT, true) after the instantiation of
> the object, you won’t be using persistent connections."
> 
> He goes on to say: "It’d be nice if PDO::setAttribute() raised a
> warning if you try to set PDO::ATTR_PERSISTENT, by the way."
> 
> I'm submitting the attached patch to do just that. :-)
> 
> --
> Ben Ramsey
> http://benramsey.com/

Reply via email to