DB – SQLite
01/31/2012 § Leave a comment
Finally, we have begun with DataBase. Storing of information and its display. One of the most important thing in any software is to store and retrieve data. We hope that the development will continue in this tempo. At the moment we are operating on Sqlite that is a local DB for mobile devices.
It was little bit difficult to operate with SQLite in PhoneGap, cos it had a different way of inserting variables into DataBase, after googling several places I still couldn’t find satisfying answer or a documentation. Even a book that I have and PhoneGap official web site hadn’t a clue so after just vulgar tests and guesses I have found the result …. maybe I wasn’t lucky and maybe the answer was somewhere there, but anyway wanted to share with people who think it is tricky and search for it…
tx.executeSql(‘INSERT INTO tale_name (row_name) VALUES (?)’, [var]);
PhoneGap 1.3.0 – Android – js, function code.