mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 08:31:30 +08:00
Replace REPLACE INTO usage
This commit is contained in:
parent
3489ae91bf
commit
c76746ad35
@ -237,7 +237,7 @@ func IsActiveSession(uuid []byte, clientSessionId string) (bool, error) {
|
||||
}
|
||||
|
||||
func UpdateActiveSession(uuid []byte, clientSessionId string) error {
|
||||
_, err := handle.Exec("REPLACE INTO activeClientSessions VALUES (?, ?)", uuid, clientSessionId)
|
||||
_, err := handle.Exec("INSERT INTO activeClientSessions (uuid, clientSessionId) VALUES (?, ?) ON DUPLICATE KEY UPDATE clientSessionId = ?", uuid, clientSessionId, clientSessionId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user