Just curious why mysql wouldnt restore the last known internal connection id. In the code below, I open a connection (without storing the connection id), use it, then open,use,close a different connection, this time using a connection id, but when I close it, the original internal connection id is history, the last query fails. It would make sense to me that php would restore the last known connection handle (if there is one) after I call mysql_close();
Any ideas? Thanks, Bob
mysql_connect("hostname", "user", "pass");
$res = mysql_db_query("mlm","select count(*) from mlm_clients");
echo mysql_num_rows($res)."<br>";
$conn = mysql_connect("hostname", "user", "pass");
$res = mysql_db_query("rollcall","select count(*) from rollcall_students");
echo mysql_num_rows($res)."<br>";
mysql_close($conn);
$res = mysql_db_query("mlm","select count(*) from mlm_clients");
echo mysql_num_rows($res)."<br>";
Any ideas? Thanks, Bob
mysql_connect("hostname", "user", "pass");
$res = mysql_db_query("mlm","select count(*) from mlm_clients");
echo mysql_num_rows($res)."<br>";
$conn = mysql_connect("hostname", "user", "pass");
$res = mysql_db_query("rollcall","select count(*) from rollcall_students");
echo mysql_num_rows($res)."<br>";
mysql_close($conn);
$res = mysql_db_query("mlm","select count(*) from mlm_clients");
echo mysql_num_rows($res)."<br>";