More bugfixing

This commit is contained in:
Niels
2025-06-07 18:45:08 +02:00
parent 30b3eb16c0
commit bcaf6006bf
9 changed files with 62 additions and 44 deletions
+18 -14
View File
@@ -7,24 +7,28 @@ function settings_db_open() {
return db;
}
function checkforold() {
function dropTable() {
//tx.executeSql("DROP TABLE IF EXISTS old_channels");
db = settings_db_open();
try {
db.transaction(function(tx)
{
var rs = tx.executeSql('SELECT * FROM channels');
// console.log("OLD DATABSE TABLE EXISTS")
});
}
catch(a)
{
// console.log("NO OLD DATABASE")
}
try {
db.transaction(
function(tx) {
tx.executeSql("DROP TABLE IF EXISTS settings");
tx.executeSql("DROP TABLE IF EXISTS stations");
tx.executeSql("DROP TABLE IF EXISTS countries");
tx.executeSql("DROP TABLE IF EXISTS tags");
}
);
}
catch(a)
{
console.log("drop failed: "+a)
return false
}
init();
}
function init() {
db = settings_db_open();
//checkforold()
try {
db.transaction(
function(tx) {