Hello evryone, does anyone here have any idea about data synchronization using php?? when I import a csv file in my system, the site will automatically synchronize the data between the csv file and the live database.. Thanks..
My question is how could I make the all records between the live database and the csv file synchronized? Actually this is the scenario, when the user upload a csv file into the system, it will automatically synchronized the data between the database and the csv, so means there will be a per record comparison between the two. So for example if record A in the database is latest than the record A in the csv, it will not overwrite the record A on the database, but if record B in the database is outdated than record B in the csv, it will overwrite the record B on the database.. I'm not sure if I'm clear but let me know so I can explain it further more.. Thanks.
that is the problem, I don't know how would I create the script for this, hehe.. can you help me?? thanks
Take a look at this page http://php.net/manual/en/function.fgetcsv.php. Just parse the csv using that function and compare it with the db.