MySQL to SQlite
Hi!
I would like to sync my MySQL db to my app.
So i've exported the tables in .sql, but it doesn't work…
I can't export or convert into SQLite, so how can I do?
Do you know any converter that's work in Titanium Mobile?
I've tried MySQL -> CVS -> SQLite, but it failed…
Thanks,
Sorry for my bad english;
Ivan.
2 Answers
-
The simplest approach is to have a server side rest API that returns a json encoded array.
Then from your app - query the url to retrieve the dataset and then iterate over it for a for loop and update the local sqLite database.The xml_rss.js example in the kitchen sink shows the general approach - although that specific example uses xml - using json is much along the same lines.
-
Thank you, I'll try!