Forgive my ignorance, but I am struggling to make a simple select query with ngCordova SQLite. I can create the database and insert fine as per the example, but cannot retrieve the data from a select query.
I am currently trying:
var query = "SELECT * FROM reports WHERE ID=?";
$cordovaSQLite.execute(db, query, [1]).then(function(data) {
console.log(JSON.stringify(data));
}, function (err) {
console.error(JSON.stringify(err));
});
But all this gives me is the res information relating to rows affected.
Does anyone have the right method to get the actual row data rather than just the res data?
I would strongly recommend to visit this 100% full working App template that illustrates how to install a prepopulated SQLite database and do queries to retrieve information from there.