Re: [Phplib-users] Problem with database class
Brought to you by:
nhruby,
richardarcher
From: Frank B. <fb...@sy...> - 2003-07-01 01:37:48
|
Is this code inside a function with $db_m being passed as a parameter? I discovered a problem many moons ago where the second query in a function would fail if database connection variable was passed to function through parameter list. Since then I have always made the variable global, and never checked to see if the problem was fixed. At 12:58 PM 6/27/03, Hugo Morganho wrote: >Hi. >I' had a strange problem with this example. > >$db_m->query("insert into magazine_user(magazine_user_user_id) values >('$user_id'"); >jc_call->Create_Project($project_name); >$db_m->query("insert into magazine_user(magazine_user_user_id) values >('$user_id'2"); > > >in the Create_project i have another $db defined that points to another >database, different from the $db_m. >When i run the second query, gives me error, because now $db_m points to >the database defined at create_project, and gives me one error. >Anyone knows how does this occur? what can i do to solve this problem? >Thanks > > > >------------------------------------------------------- >This SF.Net email is sponsored by: INetU >Attention Web Developers & Consultants: Become An INetU Hosting Partner. >Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! >INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users > |