mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-08 02:48:26 +00:00
Optimized GetWeightedPoints to only update users with records. (#758)
This commit is contained in:
parent
463b8a857b
commit
b1106d7c97
@ -787,8 +787,8 @@ void UpdateAllPoints()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char sQuery[128];
|
char sQuery[128];
|
||||||
FormatEx(sQuery, 128, "UPDATE %susers SET points = GetWeightedPoints(auth);",
|
FormatEx(sQuery, 128, "UPDATE %susers SET points = GetWeightedPoints(auth) WHERE auth IN (SELECT auth FROM %splayertimes GROUP BY auth);",
|
||||||
gS_MySQLPrefix);
|
gS_MySQLPrefix, gS_MySQLPrefix);
|
||||||
|
|
||||||
gH_SQL.Query(SQL_UpdateAllPoints_Callback, sQuery);
|
gH_SQL.Query(SQL_UpdateAllPoints_Callback, sQuery);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user