i've been having a hard time trying to join 2 tables in 2 different DBs together. This is the first time i'm doing this so please tell me if there's something wrng.
CODE
$result2=mysql_query("SELECT * FROM Cash.Payment
JOIN Contest.Details
ON Cash.Payment.INVOICE = Contest.Details.INVOICE
WHERE Cash.Payment.USER_NAME = '$_COOKIE[ID_my_site]'
LIMIT $offset, $rowsPerPage");
while($row= mysql_fetch_array($result2)) {
echo "<td>" . $row['INVOICE']. "</td>";
echo "<td>" . $row['PAYMENT_STATUS']. "</td>";
echo "<td>" . $row['PAYMENT_DATE']. "</td>";
echo "<td>" . $row['AMOUNT']. "</td>";
echo "<td>" . $row['TRANS_ID']. "</td>";
echo "<td>" . $row['PAYER_STATUS']. "</td>";
echo "<td>" . $row['PAYER_STATUS']. "</td>";
i keep getting an error on my while statement.
error: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
help would be much appreciated