i will try to reproduce my question..
App is already in the Google play store.
sqlite database in the mobile have 500 customers and is only 100 kb.
My customer put 10 records per day in the mysql database. (database exist on sharing hosting now)
Now every week i go and export the data to csv and import to sqlite manual.(that mean delay to the customer update,and updates to app every week.)
My question
is possible to export the data from mysql with (livecode server) if i buy dedicated server and use the livecode server? >>if yes how-to ?
Is possible to import a csv file with coding to the sqlite and update the data? >>if yes how-to ?
thank you
Mysql to sqlite sync or export
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Mysql to sqlite sync or export
Last edited by vedus on Sun Nov 02, 2014 7:02 pm, edited 1 time in total.
Re: Mysql to sqlite sync
maybe you can setup a php webapp for that. I was going to go with sqlite but decided to just install mysql locally
Re: Mysql to sqlite sync or export
Hi,
Of course, this is easy. Use SQL syntax in a LiveCode script to create a dump of the data. You could try something like this:
Then use the put URL command to download the sql file. Use another script to manipulate the SQL commands and use SQLite's import ability to load the modified sql file. You can also use mysqldump to export to a csv file and import the same way you to now, but by script.
Kind regards,
Mark
Of course, this is easy. Use SQL syntax in a LiveCode script to create a dump of the data. You could try something like this:
Code: Select all
get shell('mysqldump --user=... --password=... --host=... DB_NAME > /path/to/output/file.sql');
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode