Skip to content

Commit

Permalink
more fixes to sqlquery
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjh-bst committed Sep 5, 2024
1 parent 074cc81 commit 08e10fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdcommands/topservers/topservers.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var Command = &commands.YAGCommand{
shard = data.Switch("shard").Int()
}
if totalShards > 0 && shard >= 0 && shard < totalShards {
query = append(query, qm.Where("id >> 22 % ? = ?", totalShards, shard))
query = append(query, qm.Where("(id >> 22) % ? = ?", totalShards, shard))
}
query = append(query, qm.Where("left_at is null"), qm.OrderBy("member_count desc"), qm.Limit(10), qm.Offset(skip))
results, err := models.JoinedGuilds(query...).AllG(data.Context())
Expand Down

0 comments on commit 08e10fe

Please sign in to comment.