Hello
i don’t understand, i parse a remote xml like this
<marker iduser="7" type="green"/>
<marker iduser="8" type="red"/>
<marker iduser="9" type="green"/>
and i have this function:
var xml = data.responseXML;
var markers = xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var iduser = markers[i].getAttribute("iduser");
var type = markers[i].getAttribute("type");
if (type=='red')
{
console.log(' user '+iduser);
db.transaction(function (tx) {
tx.executeSql('SELECT * FROM Alertes WHERE userid = ?', [iduser], function(tx, results){
console.log('Result found for '+iduser+' = '+ results.rows.length);
//return results.rows.length;
});
});
}
}
So, my first console return iduser = 8 (OK) but my sql request return iduser=9 !!!
i don’t understand why
any idea?
thanks
Yann