select fot struct
This commit is contained in:
parent
55c456828b
commit
2610b409ff
2
main.go
2
main.go
|
@ -125,7 +125,7 @@ func Get(username string) (*UserData, bool) {
|
||||||
|
|
||||||
u := NewUser()
|
u := NewUser()
|
||||||
q := fmt.Sprintf("select username, password, id from %s_auth where username=?", c.TablePrefix)
|
q := fmt.Sprintf("select username, password, id from %s_auth where username=?", c.TablePrefix)
|
||||||
err := c.db.Get(&u, q, username)
|
err := c.db.Select(&u, q, username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
return nil, false
|
return nil, false
|
||||||
|
|
Loading…
Reference in New Issue