I’m executing a select query on a table, but it return the row length and the affected rows, but not the data.
My code:
platform.ready().then(() => {
this.db = new SQLite();
this.db.openDatabase({name: 'abc.db', location: 'default'}).then(()=>{
this.db.executeSql('select * from userGenDet', []).then((data) => {alert(JSON.stringify(data));
}, (err) => {
alert('Unable to execute sql select: '+ err);
});
}, (err) => {
alert('Unable to open database: '+ err);
});
});
Result:
{“rows”:{“length”:1},“rowsAffected”:0}
Please help me with this…