SQLite
 sql >> Datenbank >  >> RDS >> SQLite

Problem mit der Einfügeabfrage in Sqlite? (Variable einfügen)

ID-Attribut hinzufügen

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