I think the reason why i can't make two database connections is to protect other websites. I have found a solution to work around this problem. I removed the getDB function in the module and used the global variable arrdbaccess["dbname"] in the queries (in my module classes) to contact the database correctly. for example
function functionname($var1,$var2) { global $arrdbaccess;
$sql="SELECT field1 FROM ".$arrdbaccess['dbname'].".table WHERE field2='".$var1."' and field3='".$var2."' ";
$result = run_rentequery($sql);
return $result; }
You must be logged in to post messages in this topic!