I was brainstorming how I should handle this. This is how the application is going to work:
- User enters multiple pieces of data into app
- App stores data into SQLite database
- User hits SYNC button and app will pass all new/updated/deleted info to site PHP and update MYSQL.
I was thinking I can do a loop where it sends (and receive) one row at a time to mysql or I can use a string builder to build a XML, and pass (and receive) the XML string to PHP to process. The xml will have tag data specifying if the element is to be added, deleted or updated.
I figure the XML is a better option, but I'm coming here for opinions how I should push multiple rows to be added/deleted or updated to my MYSQL because I feel there's probably a more efficient/easier way of doing this.
Thanks!
--UPDATE--
Here's some helpful links I found of JSONArrays for those seeking similar information as I am about Android SQLite to PHP MYSQL.
- Nice tutorial about JSONArrays in PHP: http://webhole.net/2009/08/31/how-to-read-json-data-with-php/
- Another tutorial about JSONArrays in Java: http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/