Re: Array of PDO objects
| From: | Nathan Nobbe | Date: | Fri, 06 Jun 2008 16:25:58 +0000 |
| Subject: | Re: Array of PDO objects | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275102@lists.php.net to get a copy of this message | ||
2008/6/6 Miguel J. Jiménez <MiguelJose.Jimenez@isotrol.com>:
> Hi, I want to know if I can set an array with PDO objects, thus:
>
> $foo = array(new PDO(...), new PDO(...));
> $oSt = $foo[0]->prepare(...);
>
> and so on... I tried that aproach and PHP is always complaining about
> using prepare() in a non-object...
i doubt it has anything to do w/ PDO. have you tried var_dump() to inspect
the contents of $foo[0] ? and also, have you tried creating the PDO
instances w/ the same arguments outside of the array construct to determine
if there is any difference?
-nathan