views:

287

answers:

2

I have to download only updated data from my mysql database that I have created at server. i also have sqllite database for iphone .

Now i want any changes in database would prompt the user for doing updation.

Also an update button will be there for updating .

how to identitfy the data is updated in the database .

Also is there any code for synchronizing will be good for understanding

+1  A: 

You might want to take a look at objective sync = it provides synchronisation and integration between a local sqlite db on ithe iPhone and a RESTful web application (the interface to your Mysql DB on the server).

Mr. Matt
A: 

How else does the app communicate with the server? Why not have the app ping the server to find out if the MySQL DB is updated? Can the app check email outside of the iPhone's email client? You could generate a userID for each app User, and whenever changes are made to the MySQL server, it sends an email to the app telling it updates are available. There may even be a way to do this via something like XMPP/Jabber.

Essentially, the app has to talk to the server to get the updates regardless of how it finds out if there are updates. So that means it talks to the server in general. If that's the case, just have the server send the app an alert that there are messages. If you want the server to "push" this alert to the phone, you'll have to figure out what push methods you have available in iPhone apps.

But once you know how the server will alert the user/app/phone, you can eliminate the user's need to hit an update button, and just have the app replace the sqlite file with the updated sqlite file from the server. Since the sqlite file just reflects what is in the MySQL DB, you can avoid the headache of updating the app's file by just replacing it with an updated version.

Anthony