Joining tiered DBs in mySql, custom question
I am concatenating two DBs together to complete a request.
$strSQL = "SELECT tbl.SecurityKey, tbl.method, tbl.amount, tbl.TxType, CONCAT(u.firstname,' ',u.lastname) AS fullname FROM $CFG->paymentdbname.tblPayment tbl JOIN $CFG->dbname.vle5_user u ON u.id = " . $uid . " WHERE VendorTxCode='" . mysql_real_escape_string($strVendorTxCode) . "' and VPSTxId='" . mysql_real_escape_string($strVPSTxId) . "'";
The problem I am facing is that each DB has its own user, so when I try to query with any user it fails as the user does not have the correct privileges.
I had a good hunt in the Plesk control panel as I could answer that the DB user has access to both, but that doesn't seem like an option.
source to share