I'm trying to use the current date and time to do INSERT and SELECT statements, but the data is not getting inserted in WebSQL. Below is my code:
CREATION..
myDb.transaction(function(tr) {
tr.executeSql('CREATE TABLE IF NOT EXISTS stInfo (keyNum INTEGER NOT NULL PRIMARY KEY, timestamp varchar(255) );');
});
INSERTION
function insert() {
var timeStamp = getCurrentDate(); returns in format YYYY-MM-DD HH:MM
myDb.transaction(function(tr) {
tr.executeSql("INSERT INTO stInfo('keyNum','timestamp') values(215424," + timeStamp + ");");
});
}