mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-24 22:44:17 -04:00
Avoid duplicate rows in the admin table
This commit is contained in:
parent
ae3b5077ec
commit
2545aedc2a
2
src/db.c
2
src/db.c
@ -3303,7 +3303,7 @@ db_spotify_pl_delete(int id)
|
||||
int
|
||||
db_admin_add(const char *key, const char *value)
|
||||
{
|
||||
#define Q_TMPL "INSERT INTO admin (key, value) VALUES ('%q', '%q');"
|
||||
#define Q_TMPL "INSERT OR REPLACE INTO admin (key, value) VALUES ('%q', '%q');"
|
||||
char *query;
|
||||
|
||||
query = sqlite3_mprintf(Q_TMPL, key, value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user