I've seen some other posts on this, but I'm not totally sure I understand.
In my PHP code, I need to access a different database. So I have this code:
$username="calvary";
$password="XXXXXXXX";
$database="calvarydb";
$server="localhost";
$mylink = mysql_connect($server,$username,$password);
$db_selected = mysql_select_db($database);
if (!$db_selected) {
die( "Unable to select database");
}
.
blah
.
mysql_close($mylink);
For some reason, that mysql_close is closing the CMS database link?
I know if I leave mysql_close off, it fixes things, but that seems wrong.
Any suggestions would be appreciated.
I have seen other comments about reusing the database connection, but this is to a totally different database?
BTW, CMSMS is totally awesome. I'm loving this.
Mike Kaply
User Defined Tag and MySQL
Re: User Defined Tag and MySQL
Never mind.
According to the docs here:
http://us2.php.net/mysql_close
and the bug here:
http://bugs.php.net/bug.php?id=30525
This is how it works.
No idea why.
According to the docs here:
http://us2.php.net/mysql_close
and the bug here:
http://bugs.php.net/bug.php?id=30525
This is how it works.
No idea why.