Created
January 13, 2009 09:19
-
-
Save ZhangHanDong/46380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="gears_init.js"></script> | |
<script type="text/javascript"> | |
var db = google.gears.factory.create('beta.database'); | |
db.open('database-test'); | |
db.execute('create table if not exists Test' + | |
' (Phrase text, Timestamp int)'); | |
db.execute('insert into Test values (?, ?)', ['Monkey!', new Date().getTime()]); | |
var rs = db.execute('select * from Test order by Timestamp desc'); | |
while (rs.isValidRow()) { | |
alert(rs.field(0) + '@' + rs.field(1)); | |
rs.next(); | |
} | |
rs.close(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment