jeudi 26 mars 2015

Udate query SQlite not updating, but no error given

I have several queries working however the update query does not update the data and does not throw any errors either.


I'm obviously missing something, but I can't see what it is.


The select queries are working and the insert query is working its just the update query that is not working.


This is working



db.transaction(function (tx) {

tx.executeSql("INSERT INTO customers (firstname1,lastname1,firstname2,lastname2,email1,email2,phone1,phone2,createDate,syncDate,userId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [data.firstname1,data.lastname1, data.firstname2, data.lastname2, data.email1, data.email2, data.phone1, data.phone2, data.createDate, data.syncDate,data.userId], onError);
});


This is not working.



db.transaction(function (tx) {

tx.executeSql("UPDATE customers SET firstname1 = ?, firstname2 = ?, lastname1 = ?, lastname2 = ?, phone1 = ?, phone2 = ?, email1 = ?, email2 = ? WHERE id = ?", [firstname1, lastname1, firstname2, lastname2, email1, email2, phone1, phone2, i], updateCB, onError);
});


Any suggestions as to where to look?


Aucun commentaire:

Enregistrer un commentaire