jeudi 28 janvier 2016

LIMIT clause not working in phonegap

this javascrip code works fine in phonegap:

db.transaction(function(tx) {

            tx.executeSql('SELECT * FROM Messages ', [], function(tx, results) {

                    //do something

            }, errorSQL);

}, errorSQL);

but if I add LIMIT clause the query does not work

db.transaction(function(tx) {

        tx.executeSql('SELECT * FROM Messages LIMIT 1 OFFSET 1 ', [], function(tx, results) {

                    //do something

        }, errorSQL);
}, errorSQL);

the error function show me a message error type undefined

function errorSQL(err) {
            alert("Error processing SQL: "+err.message);
}

what is the problem?

Aucun commentaire:

Enregistrer un commentaire