Menu
Hello everybody,
I’ve been struggeling with this for a while now. But i can’t find a solution.
This is my code
[CODE]
function Dummy(value)
{
var r;
db.transaction(function (tx)
{
tx.executeSql(‘SELECT * FROM `xx` WHERE `xxx` = ? AND `xxxx` = ?’, [value, xxxx], function (tx, results)
{
if(results.rows.length) r = true;
else r = false;
}, function(tx, error) { displayError(error)) });
});
return r;
}
The query works. result.rows.length works. But i can’t assign the ‘r’ variable. The code keeps returning undefined.
So how can I return Dummy true/false considering results.rows.length.
Thanks in advance!