I thought to myself "I might need to do that one day". So I spent the last half hour or so figuring it out. Yes it is possible. I tested it by adding the following code to the bottom of the whosonline block.
Code:
$dbthis = @mysql_connect("localhost", "username", "password");
if (!$dbthis)
{
$content .="<p>Connected to host</p>";
}
else
{$content .="<p>Connected to host</p>";}
if (! @mysql_select_db("2nd database name",$dbthis))
{
$content .="<p> Not connected to database</p>";
}
else {$content .="<p>Connected to database</p>";}
mysql_close();
include "config.php";
require_once ("mainfile.php");
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
message_die(CRITICAL_ERROR, "Could not connect to the database");
}
Seems you have to close the 2nd dbase connection and reconnect back to the nuke dbase or everything else stops working......thats what lines from mysql_close do. Try it out substituting your own passwords etc.
_________________
TheWing Nuke Soldier
Joined: Aug 13, 2003
Posts: 13
Posted:
Fri Oct 17, 2003 5:00 pm
Scratch that - I got it to work - w000000t
Edit:
Forgot this forum doesn't do "This post was editted x times"
I literally had my code layed out with like 5 questions. I appreciate your help. Your post worked for me. Ever need anything cruise over to the site listed in my sig
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum