Update clan.go
This commit is contained in:
parent
2b02e0eaea
commit
e5b83bb11c
|
@ -86,7 +86,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||||
rows *sql.Rows
|
rows *sql.Rows
|
||||||
err error
|
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 {
|
if err != nil {
|
||||||
md.Err(err)
|
md.Err(err)
|
||||||
|
@ -95,7 +95,9 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
nc := clanLbSingle{}
|
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 {
|
if err != nil {
|
||||||
md.Err(err)
|
md.Err(err)
|
||||||
}
|
}
|
||||||
|
@ -125,7 +127,6 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||||
}
|
}
|
||||||
fmt.Println(n)
|
fmt.Println(n)
|
||||||
|
|
||||||
|
|
||||||
for i := 0; i < len(r.Clans); i++ {
|
for i := 0; i < len(r.Clans); i++ {
|
||||||
var members clanMembersData
|
var members clanMembersData
|
||||||
|
|
||||||
|
@ -198,6 +199,7 @@ func AllClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func TotalClanStatsGET(md common.MethodData) common.CodeMessager {
|
func TotalClanStatsGET(md common.MethodData) common.CodeMessager {
|
||||||
var (
|
var (
|
||||||
r megaStats
|
r megaStats
|
||||||
|
|
Loading…
Reference in New Issue
Block a user