For fun I started building a small application using PhoneGap. More than anything I want to build a simple mobile app and see how easy it would be to deploy to multiple platforms. Problem was the app needed to store some data locally. I immediately thought of HTML 5 and web sql databases as an option. Turns out it is pretty simple if you have done any database work in the past. There are a few gotchas when working with SQLite and for me it was particularly frustrating working with the date/time features. Create a database For simplicity I made an object called Database and added methods to the proto chain for each database action. One thing to note is that a reference to mydb has been placed in the function for the Database object. This way once the database is open we can set this.mydb to that open database connection for further calls. var Database = function(){ var mydb=false; } Database.prototype.initDB = function() { try { if (!window.openDatabase) { ...