html5 websql
var db;
if(window.openDatabase){
db=window.openDatabase('mydatabase','2.0','my db','1024*1024');
}
db.transaction(function(tx){
tx.executeSql('CREATE TABLE IF NOT EXISTS t1(id ,unique ,log)');
tx.executeSql('INSERT INTO t1(id,log) VALUES (1,"foobar")');
tx.executeSql('INSERT INTO t1(id,log) VALUES (2,"logmsg")');
});
db.transaction(function(){
tx.executeSql('SELECT * FROM t1',[],function(tx,results){
var len=results.rows.length;
console.log("~~len:"+len);
console.log("~~tx:"+tx);
},null);
});