I develop a php application to get input from a technical support field(TSF) laptop (which is not always connected to internet) and from an online server on office. My idea is to create a php file to sync (send and receive) latest data between office PC(online) and TSF laptop(offline).
The rule is that each TSF should sync every end of day to send that day report to office pc and get the latest data from office pc so they can be used even offline.
The problem is I don't know how to create that php file.
Here the structure of my mysql database :
Table merchant :
id, name, address, phone, area, lastupdate
Table item :
id, merchid, sn, sku, code, lastupdate
Table visit :
id, date, merchid, itemid, act, result, lastupdate
TSF only can edit merchant and item table and add visit table, office PC can do anything...
On each table i give lastupdate column so php sync script can compare which is the latest update...but i don't know how to compare it using php...can someone help me?