Home  >  Article  >  Web Front-end  >  JSQL a web DB encapsulation_javascript skills

JSQL a web DB encapsulation_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:28:141091browse

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.
Statement:
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