I am trying to clear my html5 local sql database but for some reason it is not working. Please see my code below: my alert always shows that length is > 0, does anyone know why?
function clearHistory(){
db.transaction( function(tx){
tx.executeSql('DELETE * FROM history', []);
});
db.transaction(function(tx) {
tx.executeSql('SELECT * FROM history', [], function (tx, results) {
var len = results.rows.length, i;
alert ("length=" + len);
});
});
}
Remove the *
DELETE FROM history