The solution ended up being so simple ... once I fixed it! When I was making the call to my second database, I was using:
PHP Code:
$db = mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
by changing that to:
PHP Code:
$dbclasses = mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
the error calling
PHP Code:
$vbulletin->db->unlock_tables();
went away. :banana: