Re: [PHP] can not re-use a object

2005-09-20 Thread [EMAIL PROTECTED]
Ok! No i do not run mmcache, $GLOBAL is ok thanks a lot! Joe Wollard wrote: >> I have try to use the same $db and to create a new one... > > Are you trying to use the $db object inside of another function later > in the code? If so you'll need to use $GLOBALS['db'] instead. > Sorry, this is the o

Re: [PHP] can not re-use a object

2005-09-20 Thread [EMAIL PROTECTED]
Ok thanks a lot! Joe Wollard wrote: >> I have try to use the same $db and to create a new one... > > Are you trying to use the $db object inside of another function later > in the code? If so you'll need to use $GLOBALS['db'] instead. > Sorry, this is the only thing I can think of with your desc

Re: [PHP] can not re-use a object

2005-09-19 Thread Joe Wollard
I have try to use the same $db and to create a new one... Are you trying to use the $db object inside of another function later in the code? If so you'll need to use $GLOBALS['db'] instead. Sorry, this is the only thing I can think of with your description Have you tried a simple test program

[PHP] can not re-use a object

2005-09-19 Thread [EMAIL PROTECTED]
Hi! Sorry about the bad english :-[ I try to re-use an object that manage the mysql connections (it is code from sugarcrm) $db = new PearDatabase(); $var = "'" . $user_id ."'"; $pregunta = "SELECT user_name FROM users WHERE id = $var"; $resultado = $db->query($pregunta, true, "Error filling in use