how can I combine the results from two separate MYSQL databases? The databases are on separate servers, they contain identical tables but different data.
I would like to get a list of items from both databases at once but sorted by date.
For example
$result = mysqli_query ($conn, "SELECT * FROM tab ORDER BY date");
$result2 = mysqli_query ($conn2, "SELECT * FROM tab ORDER BY date");
something like that
while ($row = mysqli_fetch_array ($result && $results2)) {...}
I know this is incorrect but just to visualize what I want to achieve.
If this is not possible, how else can I achieve this result?