Select count sqllite ionic

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));
    });
  }

Did you solve the issue? because i have the same :smiley:

db.executeSql(‘SELECT COUNT(mobilephonid) AS result FROM login’,{})

Your error is in the above line.

db.executeSql(‘SELECT COUNT(mobilephonid) AS result FROM login’,) use this line