From 42fc404384dbe8012c60941c5ae29b9325c8f6a9 Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 16:41:42 +0000 Subject: [PATCH] id --- register.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/register.go b/register.go index 363c0e1..515bf70 100644 --- a/register.go +++ b/register.go @@ -94,9 +94,8 @@ func registerSubmit(c *gin.Context) { return } - errr := db.Query("SELECT 1 FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))) + errr := db.QueryRow("SELECT id FROM beta_keys WHERE key_md5 = ? AND allowed = 1", cmd5(c.PostForm("key"))) fmt.Printf("%v", errr) - i = 0 for errr.Next() { i++ }