ok so this is strange as hell. I'm coding a portal for IPB 1.x for my site, but i'm connecting to two diff db's. I named my connections $myref and $njDB. The connections are declared once and called from a template file.
Now, in tmpl_top and index ( which calls tmpl_top, has some code, then calls tmpl_foot ) the Link identifier varialbles work properly and the queries execute.
However, once i get to tmpl_foot something goes wrong. I had to switch the order in which i declared my connections, and had to remove the variable for the link from the queries in the two functions that were bombing out. This is odd though because all other queries on the site work fine using the link identifier.
Here's what i mean....
this is the block of code where i defined my connections. Previously Sharelive was declared first and NJ was declared second. However for some reason or another it made the scipt go nuts....
include_once("Variables/slvars.php");
// Connect to Napjunk Database
// Make connection to database
$njDB =mysql_pconnect($dbhost,$dbuser,$dbpass) or
die(mysql_error());
mysql_select_db($dbname,$njDB) or
die(mysql_error());
// Conect to Sharelive Database
$myref = mysql_pconnect($hostname_Default, $username_Default, $password_Default) or die(mysql_error());
mysql_select_db($database_Default,$myref) or
die(mysql_error());
Then i had to go into my functions and remove the link identifier for it to work. However even having switched the order in which the connections are declared if i use a l ink identifier variable it will cause the script to bomb out.
why the hell is PHP loosing only ONE of the L-ID variables?
did i explain this well enough, or do i need to elaborate or provide more sample code...