Re: Re: passing a mysqli object via globals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 3, 2007 10:26 AM, julian <correojulian33-php@xxxxxxxx> wrote:
> Dee Ayy wrote:
> > Hopefully your only issue is the keyword global versus globals ?
>
>
> Not sure what you mean. global $db should bring to local scope a
> reference to the object that has the data base connection.
>
> PHP complaints that it cannot access properties or methods of that
> object in the obj/f1/ scope....
>
> I tried using the $GLOBALS['db'] with same results.....

In the one that failed, you used the invalid keyword "globals".
In the one that worked, you used the valid keyword "global".

When I said "hopefully", I was wondering if you could use
$GLOBALS['db'] but there may be other issues since you said that also
failed.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux