SQL select and push not working


#1

I have a select all statement from my sqlite table and my program never seems to get to it, or it doesn’t work. The alerts are there so I can see how far the code is going and I never get an alert passed table opened, which means it isn’t getting passed the select statement.
Can anybody help me solve this issue?

getData() {

this.sqlite.create({
  name: 'ionicdb.db',
  location: 'default'
}).then((db: SQLiteObject) => {
  alert("table opened");

  db.executeSql('SELECT * FROM alerts', []).then(resultSet=> {
    alert("passed select");
    this.alertsArray = [];
    if(resultSet.res.rows.length > 0) {
    for(let i = 0; i<resultSet.res.rows.length; i++) {
      this.alertsArray.push({
        "title":resultSet.res.rows.item(i).title,
        "body":resultSet.res.rows.item(i).body})
      alert("push items");
    }
  } //end of if
  })
})

} //END OF GETDATA


#2

No need to reply, I’ve solved it. The issue was having a bunch of missing brackets and parens to catch errors and such and also my create table function was screwed up :stuck_out_tongue: