Function selectData (SQL,callback) {var items; db.transaction(function (context) { context.executeSql(sql, [], function (context, results) { items = results.rows; }); }, function (error) {console.log(‘ Failed to query data :[‘ + error.message + ‘]’); callback(items); }, function () {console.log(‘ Data query succeeded ‘); callback(items); }); }
var sql=’ ‘SELECT * FROM Student’;
SelectData(sql,function(data){
console.log(data)
})