Update clan.go

This commit is contained in:
Alicia 2019-02-24 14:29:19 +00:00
parent 2b02e0eaea
commit e5b83bb11c

View File

@ -86,7 +86,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
rows *sql.Rows
err error
)
rows, err = md.DB.Query("SELECT id, name, description, icon FROM clans")
rows, err = md.DB.Query("SELECT id, name, description, tag, icon FROM clans")
if err != nil {
md.Err(err)
@ -95,7 +95,9 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
defer rows.Close()
for rows.Next() {
nc := clanLbSingle{}
err = rows.Scan(&nc.ID, &nc.Name, &nc.Description, &nc.Icon)
err = rows.Scan(&nc.ID, &nc.Name, &nc.Description, &nc.Tag, &nc.Icon)
fmt.Println(rows)
fmt.Println(&nc.Tag)
if err != nil {
md.Err(err)
}
@ -125,7 +127,6 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
}
fmt.Println(n)
for i := 0; i < len(r.Clans); i++ {
var members clanMembersData
@ -198,6 +199,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
func TotalClanStatsGET(md common.MethodData) common.CodeMessager {
var (
r megaStats