sql
This commit is contained in:
parent
0dfcae78a3
commit
34dbd46732
2
main.go
2
main.go
|
@ -182,7 +182,7 @@ func SaveUser(username string, d UserData) bool {
|
||||||
|
|
||||||
func Bump(username string, ip string) {
|
func Bump(username string, ip string) {
|
||||||
log.Printf("bump: username = %s, ip = %s", username, ip)
|
log.Printf("bump: username = %s, ip = %s", username, ip)
|
||||||
q := fmt.Sprintf("update %s_auth set lastseen=CURRENT_TIMESTAMP, set lastseenip=$2 where username ILIKE $1", c.TablePrefix)
|
q := fmt.Sprintf("update %s_auth set lastseen=CURRENT_TIMESTAMP, lastseenip=$2 where username ILIKE $1", c.TablePrefix)
|
||||||
_, err := c.db.Exec(q, username, ip)
|
_, err := c.db.Exec(q, username, ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("scsusers.Bump: Error on user bump: %s : %s\n", username, err.Error())
|
log.Printf("scsusers.Bump: Error on user bump: %s : %s\n", username, err.Error())
|
||||||
|
|
Loading…
Reference in New Issue