مرحبا..
ماهو الخطأ في الكود
document.addEventListener('deviceready', function() {
db = window.sqlitePlugin.openDatabase({
name: 'demo.db',
location: 'default'
});
db.transaction(function(tx) {
tx.executeSql('CREAT TABLE IF NOT EXISTS DemoTable (id, name, score)');
tx.executeSql('INSERT INTO DemoTable VALUES (?,?,?)', [1, 'Ali', 101]);
tx.executeSql('INSERT INTO DemoTable VALUES (?,?,?)', [2, 'ahmed', 202]);
}; function(error) {
alert('Transaction ERROR: ' + error.message);
}; function() {
alert('Populated database OK ');
});
});