mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Fix /timecp
not working with MySQL
This commit is contained in:
parent
5a05f6e098
commit
cf6569029f
|
@ -220,11 +220,11 @@ bool CScoreWorker::LoadPlayerTimeCp(IDbConnection *pSqlServer, const ISqlData *p
|
|||
str_format(aBuf, sizeof(aBuf),
|
||||
"SELECT"
|
||||
" Time, cp1, cp2, cp3, cp4, cp5, cp6, cp7, cp8, cp9, cp10, cp11, cp12, cp13, "
|
||||
" cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25, "
|
||||
" (cp1 + cp2 + cp3 + cp4 + cp5 + cp6 + cp7 + cp8 + cp9 + cp10 + cp11 + cp12 + cp13 + cp14 + "
|
||||
" cp15 + cp16 + cp17 + cp18 + cp19 + cp20 + cp21 + cp22 + cp23 + cp24 + cp25 > 0) AS hasCP "
|
||||
" cp14, cp15, cp16, cp17, cp18, cp19, cp20, cp21, cp22, cp23, cp24, cp25 "
|
||||
"FROM %s_race "
|
||||
"WHERE Map = ? AND Name = ? AND hasCP = true "
|
||||
"WHERE Map = ? AND Name = ? AND "
|
||||
" (cp1 + cp2 + cp3 + cp4 + cp5 + cp6 + cp7 + cp8 + cp9 + cp10 + cp11 + cp12 + cp13 + cp14 + "
|
||||
" cp15 + cp16 + cp17 + cp18 + cp19 + cp20 + cp21 + cp22 + cp23 + cp24 + cp25) > 0 "
|
||||
"ORDER BY Time ASC "
|
||||
"LIMIT 1",
|
||||
pSqlServer->GetPrefix());
|
||||
|
|
Loading…
Reference in a new issue