Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

MySQL to SQlite


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…

Sorry for my bad english;

— asked May 9th 2010 by Ivan Mathy
  • database
  • iphone
  • mobile
  • mysql
  • sqlite

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.

    — answered May 9th 2010 by David Ashwood
  • Thank you, I'll try!

    — answered May 9th 2010 by Ivan Mathy
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.