This commit is contained in:
shoopea 2020-06-25 19:04:51 +02:00
parent 27f43cc95e
commit eda8f545b3

10
sql.go
View File

@ -903,17 +903,23 @@ func insertMsgPillageInc(m *ChatWarsMessagePillageInc) error {
func getSQLListID64(q string) []int64 { func getSQLListID64(q string) []int64 {
var ( var (
id int64 id int64
ids []int64 ids []int64
count int64
) )
rows, err := db.Query(q) rows, err := db.Query(q)
logOnError(err, "getSQLListID64 : "+q) logOnError(err, "getSQLListID64 : "+q)
count = 0
for rows.Next() { for rows.Next() {
count++
err = rows.Scan(&id) err = rows.Scan(&id)
logOnError(err, "getSQLListID64 : scan next val") logOnError(err, "getSQLListID64 : scan next val")
ids = append(ids, id) ids = append(ids, id)
if count%10000 == 0 {
log.Printf("getSQLListID64 : %d entries", count)
}
} }
err = rows.Err() err = rows.Err()
logOnError(err, "getSQLListID64 : query end") logOnError(err, "getSQLListID64 : query end")