summaryrefslogtreecommitdiffstats
path: root/src/database/database.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/database.vala')
-rw-r--r--src/database/database.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database/database.vala b/src/database/database.vala
index 9596954..6bcbd70 100644
--- a/src/database/database.vala
+++ b/src/database/database.vala
@@ -121,7 +121,7 @@ public class DataBase : Object {
queries["total_sales"] = "SELECT SUM(price) FROM invoice WHERE user >= 0 AND timestamp >= ?";
queries["total_profit"] = "SELECT SUM(price - (SELECT price FROM purchaseprices WHERE product = productid)) FROM invoice WHERE user >= 0 AND timestamp >= ?";
queries["user_get_ids"] = "SELECT id FROM users WHERE id > 0";
- queries["user_replace"] = "INSERT OR REPLACE INTO users ('id', 'email', 'firstname', 'lastname', 'gender', 'street', 'plz', 'city', 'pgp', 'hidden', 'disabled') VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+ queries["user_replace"] = "INSERT OR REPLACE INTO users ('id', 'email', 'firstname', 'lastname', 'gender', 'street', 'plz', 'city', 'pgp', 'hidden', 'disabled', 'sound_theme') VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (select sound_theme from users where id = ?))";
queries["user_auth_create"] = "INSERT OR IGNORE INTO authentication (user) VALUES (?)";
queries["user_disable"] = "UPDATE users SET disabled = ? WHERE id = ?";
queries["last_timestamp"] = "SELECT timestamp FROM sales ORDER BY timestamp DESC LIMIT 1";
@@ -872,6 +872,7 @@ public class DataBase : Object {
statements["user_replace"].bind_text(9, u.pgp);
statements["user_replace"].bind_int(10, u.hidden ? 1 : 0);
statements["user_replace"].bind_int(11, u.disabled ? 1 : 0);
+ statements["user_replace"].bind_int(12, u.id);
int rc = statements["user_replace"].step();
if(rc != Sqlite.DONE)