go: db: Use sqlite3 syntax instead of MySQL extension syntax

master
Luther Wen Xu 2019-10-18 12:29:10 +07:00
parent 1da6ceb136
commit ddf9af9557
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 1 deletions

@ -35,6 +35,6 @@ func GetTotalActiveLevel() (int, error) {
} }
func AddActiveLevel(discordID string, addedLevel int) error { func AddActiveLevel(discordID string, addedLevel int) error {
_, err := db.Exec("INSERT INTO activeLevel(id, level) VALUES(?, ?) ON DUPLICATE KEY UPDATE level=level+?", discordID, addedLevel, addedLevel) _, err := db.Exec("INSERT INTO activeLevel(id, level) VALUES(?, ?) ON CONFLICT(id) DO UPDATE SET level=level+?", discordID, addedLevel, addedLevel)
return err return err
} }