PDA

View Full Version : header uses different DB


DigitalCrowd
Sat 9th Dec '00, 1:41pm
Hi All,

I have searched and tried many various solutions from other postings and responses on this board. However, none have been able to resolve my problem.

On my site, I have a file called "header.php" and "footer.php" that I include on all my documents, this way I can make site wide changes easily by changing only one file.

I would like to be able to use this same file in the VB software. My problem is this...

My header.php file accesses my sites primary database to pull information from... this is a different DB than what VB uses. From what I can tell, is the VB software is coughing on this other "db" that is being used in the various scripts I have running included in the header file.

I have went through and modified my code to be "multiple DB" friendly (as per info supplied on zend.com) and it still doesn't work. I just get the big fat error that there are problems with the database and try refreshing.

I know it is using the my sites database and not the forum database by the information in the error message sent to me via email.

I have struggled with this for weeks... please help.

Scott

Freddie Bingham
Sat 9th Dec '00, 2:05pm
You will need to post your header.php and footer.php for us to help you.

DigitalCrowd
Sat 9th Dec '00, 2:35pm
My header.php calls 7 different include php scripts, which each include a db.php script. My header.php script itself is mainly html, with the only "php" in them is the includes.

I already know what the issue is... but how do I get VB to actually use its OWN database, instead of using mine called inside the db.php file... which is in multiple PHP scripts, that are included in a header.php... that is called via VB.

Scott

Mike Sullivan
Sat 9th Dec '00, 2:51pm
After it's done parsing all the header (and all the footer), just reselect the vB database.

DigitalCrowd
Sat 9th Dec '00, 6:09pm
WOW... that actually worked. I feel stupid now.

Still some various formatting errors, but nothing I can tackle, or at least attempt on my own until I run into trouble.

Thanks,

Scott