mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 11:28:26 +00:00
Micro optimization for recalculation SQL query.
This commit is contained in:
parent
e7e1935388
commit
10bed693da
@ -733,8 +733,8 @@ void UpdateAllPoints(bool recalcall = false)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FormatEx(sQuery, 256, "UPDATE %susers SET points = GetWeightedPoints(auth) WHERE %d - lastlogin < %d AND auth IN (SELECT DISTINCT auth FROM %splayertimes);",
|
FormatEx(sQuery, 256, "UPDATE %susers SET points = GetWeightedPoints(auth) WHERE lastlogin > %d AND auth IN (SELECT DISTINCT auth FROM %splayertimes);",
|
||||||
gS_MySQLPrefix, GetTime(), (gCV_LastLoginRecalculate.IntValue * 60), gS_MySQLPrefix);
|
gS_MySQLPrefix, (GetTime() - gCV_LastLoginRecalculate.IntValue * 60), gS_MySQLPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
gH_SQL.Query(SQL_UpdateAllPoints_Callback, sQuery);
|
gH_SQL.Query(SQL_UpdateAllPoints_Callback, sQuery);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user