More bugfixing
This commit is contained in:
+18
-14
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user