Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-04 Thread julian
Dee Ayy wrote: no worries I give up. It is really weird I know Hope some day I will get enlighted. In one file, any method within a class is happy with the global $db...on a different (same file !!!) class no method is happy with accessing $db via global... So you confirmed that you

Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread Dee Ayy
> no worries I give up. It is really weird I know Hope some day I > will get enlighted. > > In one file, any method within a class is happy with the global > $db...on a different (same file !!!) class no method is happy with > accessing $db via global... So you confirmed that you are usi

Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread julian
Dee Ayy wrote: On Dec 3, 2007 10:26 AM, julian <[EMAIL PROTECTED]> 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

Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread Dee Ayy
On Dec 3, 2007 10:26 AM, julian <[EMAIL PROTECTED]> 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 tha

Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread julian
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/f

Re: [PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread Dee Ayy
Hopefully your only issue is the keyword global versus globals ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: passing a mysqli object via globals

2007-12-03 Thread julian
however this will work... p1.inc 1 var;; 9} 10 } 11 12 class obj { 13var $obj2=20; 14 15function f1(){ 16 global $db; 17 18 echo "\n".$db->fun2()*$this->obj2."\n"; 19} 20 } 21 ?> 1 #!/usr/bin/php -q 2 3 f1(); 13 14 ?> -- PHP Database Mailing