Basically I have a MySQL database with 30,000+ records. This database has had manual changes made over the month, but each month a new database is sent with maybe 100-300 new records along with the old records.
The records are never in order but have unique id's ie the new set might have id 234,21347,16 that the old database didnt have.
In short I need to be able to tell the difference between the two databases and only insert the new records. I have tried using array_diff it returns 0 in php 4.7 no matter what array I throw at it.
I tried writing code to manually do an array_search on database 1 from database 2, this takes a year for each record check.
Is there some simple way to compare 2 databases in MySQL and find the item_id's that are not in the active database and insert them? Or do I need to write some huge merger executable and let it run overnight or something?
Any help is appreciated.
Termn8r