I am getting a result set of data from a SQLite query:
function GetCustomersFromSQL(){
DB = SqlOpenDatabase("pts.db3", "1.0", "PTS");
var sqlList;
sqlList=[];
sqlList[0]=["SELECT id, customer_name from customer ORDER BY customer_name;" , [], ResultToHomeCustomerInput];
Sql(DB, sqlList);
};
I want to run this function to set a Bootstrap Input Datalist to the result of the call back.
function ResultToHomeCustomerInput(transaction, results){
DBRecords = results;
inputCustomer.datalist = DBRecords;
// for(i=0; i<=DBRecords.rows.length-1; i++){
// DBRecords.rows.item(i)['customer_name'];
// }
};
Do I need to build a loop like in the commented lines to load the inputCustomer.datalist array?
Ryan