Home > Web Front-end > JS Tutorial > body text

JSQL a web DB encapsulation_javascript skills

WBOY
Release: 2016-05-16 18:28:14
Original
1092 people have browsed it

Continuing from the JSQL mentioned above
4. Of course, with the popularity of HTML5, web DB has become the general trend
Therefore, JSQL is encapsulated into:

Copy code The code is as follows:

_CLIENTDATABASE_ = 'HotelManage';
_CLIENTDBVERSION_ = '0.1';
_CLIENTDBDESC_ = "First Client DataBase";
_CLIENTDBSIZE_ = 10240;

JSQL("create table sqllite(id int)").OnClient().execute();
for (var i = 0; i < 1000; i ) {
JSQL("insert into sqllite (id) values ​​(" i ")").OnClient().execute();
};
var result = ("select * from sqllite").OnClient( ).executeSQL();
//alert(result);
for(var i=0;i//do something using result[i]
};

Of course, web DB's sqlite also supports Insert / select / update / delete / create / drop table
Even more powerful sql statements.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template