Create php file to sync mysql data from some local server -
i develop php application input technical support field(tsf) laptop (which not connected internet) , online server on office. idea create php file sync (send , receive) latest data between office pc(online) , tsf laptop(offline).
the rule each tsf should sync every end of day send day report office pc , latest data office pc can used offline.
the problem don't know how create php file.
here structure of 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 can edit merchant
, item
table , add visit
table, office pc can anything...
on each table give lastupdate
column php sync script can compare latest update...but don't know how compare using php...can me?
it's not easy, need know bit php programming. of course can't expect here (you may pay though).
however, why not trying less elegant more simple way:
- use cron jobs , simple mysql commands extract tables want .sql file.
- send file other pc via ftp, scp or whatever want
- again, via cron jobs , simple mysql commands, update tables in current database file received.
Comments
Post a Comment