Zen Cart Logo
Forums / General Questions / re connect to Database.

re connect to Database.

Locked

Views: 1,494

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
4 Sep 2008, 7:31 PM
#1
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

re connect to Database.

Say I have made a connection to a second database that is not the cart database. How would I go about reconnecting to the ZenCart database after having connected to a different database?

I am connecting to a different database on the define_main_page.php and apparently I loose the connection with the carts database at this point. It is not as simple as making a new connection to the cart database - I know this much because I have tried.

4 Sep 2008, 7:46 PM
#3
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: re connect to Database.

Sorry, apparently you don't need to re-connect to the ZenCart database, the connection is not really ever lost!

It was one of the variables I was using was conflicting with a native ZenCart variable i.e. the $db variable. So I just changed the $db variable I was using to $dbb and that worked.

Thanks for looking.

4 Sep 2008, 7:48 PM
#4
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: re connect to Database.

s_t_e_v_e:

Is this link of any use http://uk3.php.net/manual/en/function.mysql-connect.php#82040

Steve

thanks Steve, yes there is some helpful info there that I will wade through. Thanks for the quick reply.