Hi, I’ve got two questions really, one very basic, the other perhaps not.
I want a button on our tablet ordering app that will ‘update’ i.e. synchronise tables between a local mysql database and an online mysql database.
I have managed to do this but it’s complicated and not particularly seamless.
Q1 is how can I make this process more seamless?
This is what I’ve done:
At various intervals the web database does a SQL dump, it’s zipped and placed on the web.
The app ‘update’ button starts an ftp download. When the download is complete another button appears and is clicked… ‘unzipping’. This unzips the file.
Then there’s another button: it moves and renames the unzipped dump. And yet another which runs a windows bat file to open the local database and run the sql dump.
I found that if I put these scripts in the one place (even when divided into separate processes/commands) they wouldn’t work. Each module seems to need to run and quit cleanly before the next is run. I experimented with work-arounds like ‘on idle’ but only really had success with ‘click at the loc of btn “do-the-next-step”’.
I’ve made the button labels appear to be messages so it’s okay but I’m wondering if there’s a better way.
Q2 Maybe I’m going at this the wrong way altogether. Downloading and running a sql dump? Is there a better way to synchronise tables between a web and tablet database? I can use php now.
Any advice much appreciated.
Steve
synchronise tables; end one process, begin another
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 101
- Joined: Wed Dec 22, 2010 8:17 pm