0
I need a solution to compare any changes in the table products_csv in relation to table products even if it is only the exchange of a (letter or number) in some field.
I am using the code below but only works for unique records because if there are duplicate records in one loop does not answer.
$sql= "SELECT * FROM produtos_csv
WHERE produto_codigo NOT IN (SELECT produto_codigo FROM produtos)
OR produto_descricao NOT IN (SELECT produto_descricao FROM produtos)";
Example of Registry Change:
TABLE products_csv arrived with field produto_descricao='Bolas Azuis'
and in the TABLE products is with the product field'
Place an example of the records
– Roberto de Campos