MikeA
05-30-2003, 11:25 AM
Can anyone tell me why this isn't working?
$connection2 = mysql_connect($mb_db_host, $mb_db_user, $mb_db_password) or die(mysql_error());
if (!mysql_select_db($mb_db_name, $connection2))
{
mysql_close ($connection2);
print".mysql_error()";
die ("stopped at mysql_select_db<p>");
}
$connection1 = mysql_connect($dbservername, $dbusername, $dbpassword) or die(mysql_error());;
if (!mysql_select_db($dbname, $connection1))
{
mysql_close ($connection1);
print".mysql_error()";
die ("stopped at mysql_select_db<p>");
}
$query = "SELECT *
FROM client_info";
$result = mysql_query($query, $connection2) or die(mysql_error());
while ($items = mysql_fetch_array($result))
{
$client_billing_id = stripslashes($items["client_id"]);
There is more code, but the jist of this is that the information it's grabbing is from whatever the last database that was opened, the $connectionX doesn't seem to make a difference.
$connection2 = mysql_connect($mb_db_host, $mb_db_user, $mb_db_password) or die(mysql_error());
if (!mysql_select_db($mb_db_name, $connection2))
{
mysql_close ($connection2);
print".mysql_error()";
die ("stopped at mysql_select_db<p>");
}
$connection1 = mysql_connect($dbservername, $dbusername, $dbpassword) or die(mysql_error());;
if (!mysql_select_db($dbname, $connection1))
{
mysql_close ($connection1);
print".mysql_error()";
die ("stopped at mysql_select_db<p>");
}
$query = "SELECT *
FROM client_info";
$result = mysql_query($query, $connection2) or die(mysql_error());
while ($items = mysql_fetch_array($result))
{
$client_billing_id = stripslashes($items["client_id"]);
There is more code, but the jist of this is that the information it's grabbing is from whatever the last database that was opened, the $connectionX doesn't seem to make a difference.
