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 {
var (
id int64
ids []int64
id int64
ids []int64
count int64
)
rows, err := db.Query(q)
logOnError(err, "getSQLListID64 : "+q)
count = 0
for rows.Next() {
count++
err = rows.Scan(&id)
logOnError(err, "getSQLListID64 : scan next val")
ids = append(ids, id)
if count%10000 == 0 {
log.Printf("getSQLListID64 : %d entries", count)
}
}
err = rows.Err()
logOnError(err, "getSQLListID64 : query end")