Skip to content

SELECT query return only the first row #1013

@landry161

Description

@landry161

Hi everybody. I'm using this plugin with ionic capacitor. The insert query works fine. But where i use the select query.
cnx.create({
name:"ionic-capacitor.db",
location:"default"
}).then((db:SQLiteObject)=>{
db.executeSql("SELECT id,value_one,value_twoFROM tasks",[]).then((resultTasks)=>
{
for(let index=0;index<resultTasks.rows.length;index++)
{
alert("Only the first row is displayed "+JSON.stringify(resultTasks.rows.item(index)));
myTasks.push({
id:resultTasks.rows.item(index).id,
one:resultTasks.rows.item(index).value_one,
two:resultTasks.rows.item(index).value_two
});
}
result(resultTasks);
}).catch((error)=>{
fail(error);
});
}).catch((error)=>{
fail(error);
});

Can you help me please ?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions