transaction.executeSql('SELECT t1.*,t2.Cust_name FROM invoice t1,customer t2 where t2.Cust_name="'+rname+'" and t1.Cust_code=t2.UserId', [], function(transaction, result) { le=result.rows.length; for (var i = 0; i < result.rows.length; i++) { var row = result.rows.item(i); rid=row.Invoice_number; console.log(rid); if(rid) document.location.href="invoice_data_list.html?rname="+rname+"&rid="+rid; console.log("s"); } });
SELECT i.invoice_id, i.date, i.amt, c.custname, c.bal_amt FROM invoice i INNER JOIN customer c ON i.cust_code = c.userid WHERE c.Cust_name="rname"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)