html5 webDatabase 存储中sql语句执行可嵌套使用

html5 webDatabase 存储中sql语句执行可嵌套使用,代码如下:

var data = window.openDatabase("stu","1.0","stu database",*);
data.transaction(function(tx){
tx.executeSql("create table if not exists news (id, title)");
tx.executeSql("select * from news where id = '1'",[],function(tx,result){
console.log("成功"+result.rows.length);
if(result.rows.length == ){
tx.executeSql("select * from news where id = '123456'",[],function(tx,result){
console.log("成功2"+result.rows.length);
})
}
})
})
上一篇:【干货】ECS服务器OPENVPN搭建,方便管理所有内网服务器


下一篇:android模块化app开发-4为APP减负