Het ontbrekende stuk is een id-kolom:
var db = window.sqlitePlugin.openDatabase({name: "MYDB"});
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS Locationlog ' +
'(id INTEGER PRIMARY KEY AUTOINCREMENT, Coordinates TEXT, ' +
'Location TEXT, Category TEXT, Address TEXT)');
});
db.transaction(function (tx) {
tx.executeSql('INSERT INTO Locationlog ' +
'(Coordinates, Location, Category, Address) VALUES (?,?,?,?)',
[Latlongs, Location, Category, Address]);
});Door waarden als tweede argument aan executeSql mee te geven, voorkom je quotingproblemen en SQL-injectie.