-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from ivoxavier/48-updateusertable-still-has-re…
…ference-to-utfoods-db fix referenc to DB
- Loading branch information
Showing
2 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
* 2022 Ivo Fernandes <[email protected]> | ||
* 2022-2023 Ivo Xavier | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; version 3. | ||
* | ||
* utFoods is distributed in the hope that it will be useful, | ||
* kaltracker is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
|
@@ -16,37 +16,37 @@ | |
|
||
|
||
function connectDB() { | ||
return LocalStorage.openDatabaseSync("utFoods_db", "0.1", "utFoods_data", 2000000); | ||
return LocalStorage.openDatabaseSync("kaltracker_db", "0.2", "keepsYourData", 2000000); | ||
} | ||
|
||
function updateWeight(newWeight){ | ||
|
||
var update_weight_statement = 'UPDATE user \ | ||
SET weight = new_weight \ | ||
WHERE user.id == id_login'.replace("new_weight",newWeight).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_weight",newWeight).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_weight_statement); | ||
} | ||
); | ||
return console.log("New weight defined") | ||
|
||
} | ||
|
||
function updateAge(newAge){ | ||
|
||
var update_age_statement = 'UPDATE user \ | ||
SET age = newAge \ | ||
WHERE user.id == id_login'.replace("newAge",newAge).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("newAge",newAge).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_age_statement); | ||
} | ||
); | ||
return console.log("New age defined") | ||
|
||
} | ||
|
||
|
||
|
@@ -55,75 +55,75 @@ function updateAge(newAge){ | |
|
||
var update_height_statement = 'UPDATE user \ | ||
SET height = new_height \ | ||
WHERE user.id == id_login'.replace("new_height",newHeight).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_height",newHeight).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_height_statement); | ||
} | ||
); | ||
return console.log("New height defined") | ||
|
||
} | ||
|
||
|
||
function updateRecCal(newGoal){ | ||
|
||
var update_goal_statement = 'UPDATE user \ | ||
SET rec_cal = new_goal \ | ||
WHERE user.id == id_login'.replace("new_goal",newGoal).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_goal",newGoal).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_goal_statement); | ||
} | ||
); | ||
return console.log("New goal defined") | ||
|
||
} | ||
|
||
function updateActivity(newActivity){ | ||
|
||
var update_activity_statement = 'UPDATE user \ | ||
SET activity = new_activity \ | ||
WHERE user.id == id_login'.replace("new_activity",newActivity).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_activity",newActivity).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_activity_statement); | ||
} | ||
); | ||
return console.log("New activity defined") | ||
|
||
} | ||
|
||
|
||
function updateApHi(ap_hi){ | ||
|
||
var update_ap_hi_statement = 'UPDATE user \ | ||
SET ap_hi = new_aphi \ | ||
WHERE user.id == id_login'.replace("new_aphi",ap_hi).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_aphi",ap_hi).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_ap_hi_statement); | ||
} | ||
); | ||
return console.log("ap_hi defined") | ||
|
||
} | ||
|
||
function updateApLo(ap_lo){ | ||
|
||
var update_ap_lo_statement = 'UPDATE user \ | ||
SET ap_lo = new_aplo \ | ||
WHERE user.id == id_login'.replace("new_aplo",ap_lo).replace("id_login", app_settings.id_login) | ||
WHERE user.id == id_login'.replace("new_aplo",ap_lo).replace("id_login", 1) | ||
|
||
var db = connectDB(); | ||
var rs; | ||
db.transaction(function(tx) { | ||
rs = tx.executeSql(update_ap_lo_statement); | ||
} | ||
); | ||
return console.log("ap_lo defined") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: kaltracker.ivoxavier\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-02-09 11:37+0000\n" | ||
"POT-Creation-Date: 2023-02-09 11:50+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|