From 686583c37af269137898ab01af4c2b585f91baea Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 24 Sep 2009 18:16:42 +1000 Subject: Only same-as-webkit iteration example (QML actually supports more) --- examples/declarative/sql/hello.qml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sql/hello.qml index e43d320..db568a9 100644 --- a/examples/declarative/sql/hello.qml +++ b/examples/declarative/sql/hello.qml @@ -12,15 +12,8 @@ Text { tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]); tx.executeSql('SELECT * FROM Greeting', [], function(tx, rs) { - /* Inefficient HTML5-compatible way for(var i = 0; i < rs.rows.length; i++) { - r += rs.rows[i][0] + ", " + rs.rows[i][1] + "\n" - } - */ - /* Efficient way: forward only, not "length" query */ - rs.rows.forwardOnly = true; - for(var i = 0; rs.rows[i]; i++) { - r += rs.rows[i][0] + ", " + rs.rows[i][1] + "\n" + r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n" } }, function(tx, error) { -- cgit v0.12