I've set up a table with Data that no should be fetched, I'll call it here Table . The data that was in this table are these:
|Tabela_Not|
Londres
Tóquio
Paris
And I applied this Query to do searches by dropping the Table_Not items:
SELECT * FROM BancoANoServidor1.registros WHERE Papel NOT IN (SELECT Papel FROM BancoANoServidor1.Tabela_Not);
As you can see in Query, the two tables are on the same database / server, my question is, what table records would I like to do this query is on another server > BancoBNo.Server2.registers ).
Can you solve this using only Mysql? Or is there another way to solve this in PHP? There is something like:
$Query_not = "SELECT Papel FROM BancoANoServidor1.Tabela_Not";
$result_not = mysqli_query($conecta1, $Query_not);
$Query_return = "SELECT * FROM BancoBNoServidor2.registros WHERE Papel NOT IN ($result_not)";
$return = mysqli_query($conecta2, $Query_return);