Skip to content

Commit

Permalink
wrong sql without group by
Browse files Browse the repository at this point in the history
  • Loading branch information
nabice committed Jul 3, 2018
1 parent 139693e commit f90c1e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func checkUserQuery(username, pass string) *UserData {
sql = `SELECT id, uname, COUNT(*) as cnt
FROM Users
WHERE uname=?
AND pass=?`)
AND pass=? group by id, uname`)

stmt, err := db.Prepare(sql)
if err != nil {
Expand Down

0 comments on commit f90c1e4

Please sign in to comment.