From fb86044011f998a06ff6f6ca91118c99f56df42a Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Mon, 2 Apr 2012 01:51:39 +0200 Subject: [PATCH] Missed change to API in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f94a59..890506d 100644 --- a/README.md +++ b/README.md @@ -175,10 +175,10 @@ Legacy PhoneGap (old version) db.executeSql('DROP TABLE IF EXISTS test_table'); db.executeSql('CREATE TABLE IF NOT EXISTS test_table (id integer primary key, data text, data_num integer)'); db.transaction(function(tx) { - return tx.executeSql(["INSERT INTO test_table (data, data_num) VALUES (?,?)", "test", 100], function(res) { + return tx.executeSql("INSERT INTO test_table (data, data_num) VALUES (?,?)", ["test", 100], function(res) { console.log("insertId: " + res.insertId + " -- probably 1"); console.log("rowsAffected: " + res.rowsAffected + " -- should be 1"); - return db.executeSql("select count(id) as cnt from test_table;", function(res) { + return db.executeSql("select count(id) as cnt from test_table;", [] function(res) { console.log("rows.length: " + res.rows.length + " -- should be 1"); return console.log("rows[0].cnt: " + res.rows[0].cnt + " -- should be 1"); });