Select data from SQLite using Ionic Native


#1

I already created database and table. And I inserted some data and try to select data from the table. But I get respond length of data that I’ve inserted but not value from the table.How can I get it??
Here is my code.

this.sqlite.create({
			name: 'yps.db',
			location: 'default'
		})
		.then((db: SQLiteObject) => {
			db.executeSql('select * from auth_data',{})
			.then((data) => {
				console.log(data)
				console.log(data.rows.length);
				var auth = data.rows.item;
				console.log(auth)
			})
			.catch(e => {
				console.log(e);
			})
		})

#2

In your then:

for (let i = 0; i < data.rows.length; i++) {
        let item = data.rows.item(i);
        // do something with it

        this.results.push(item);
}

#3

Wow!! It’s work. Thank you very much!!!