我无法通过第一个结果进行选择
目标是:在“行”表上进行查询,拿起您的 ID 并搜索“客户”表行的客户
这是我的代码:
db = window.openDatabase("test", "1.0", "Test DB", 1000000);
db.transaction(SelectData,erroSelect,sucessSelect);
function SelectData(tx)
{
tx.executeSql("select id from linha",[],function(tx, response)
{
for(i=0; i<response.rows.length; i++)
{
tx.executeSql("SELECT * FROM customers WHERE line= ?", [response.rows.item(i).id],
function (tx, results)
{
for(r=0; r<results.rows.length; r++)
{
alert(results.rows.item(r).nome); //never worked
}
}
}
},SelectError);
}