html5 webDatabase 存储中sql语句执行可嵌套使用
生活随笔
收集整理的這篇文章主要介紹了
html5 webDatabase 存储中sql语句执行可嵌套使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
html5 webDatabase 存儲中sql語句執行可嵌套使用,代碼如下:
var data = window.openDatabase("stu","1.0","stu database",1024*10); 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 == 0){tx.executeSql("select * from news where id = '123456'",[],function(tx,result){console.log("成功2"+result.rows.length);})}}) })?
轉載于:https://www.cnblogs.com/wshiqtb/p/3595920.html
總結
以上是生活随笔為你收集整理的html5 webDatabase 存储中sql语句执行可嵌套使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python对文件操作的相关函数_pyt
- 下一篇: 2.6宽带接入技术ADSL