Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Select count sqllite ionic 3

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles