@andika1204 wrote:
i want to ask why if i alert my result it becomes undefined? this is the code
result:any; countdb(){ this.sqlite.create({ name: 'logindata.db', location: 'default' }).then((db: SQLiteObject) => { db.executeSql('SELECT COUNT(mobilephonid) AS result FROM login',{}) .then(res => { this.result = res.rows.item(0).result alert(this.result)}) .catch(e => console.log(e)); }); }
Posts: 1
Participants: 1