- Timestamp:
- Sep 6, 2019, 9:58:18 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r19 r20 708 708 { 709 709 $DbResult = $this->Database->query('SELECT (SELECT COUNT(*) FROM '.$Table.' WHERE '.$Where.') AS TotalCount, '. 710 '(SELECT SUM( Distance) FROM '.$Table.'Stat LEFT JOIN '.$Table.' ON '.$Table.'.Id='.$Table.'Stat.'.$Table.' WHERE '.$Where.') AS TotalDistance, '.711 '(SELECT SUM( Money) FROM '.$Table.'Stat LEFT JOIN '.$Table.' ON '.$Table.'.Id='.$Table.'Stat.'.$Table.' WHERE '.$Where.') AS TotalMoney');710 '(SELECT SUM(T1.Distance) FROM (SELECT (SELECT Distance FROM '.$Table.'Stat WHERE '.$Table.'Stat.'.$Table.' = '.$Table.'.Id ORDER BY Time DESC LIMIT 1) AS Distance FROM '.$Table.' WHERE '.$Where.') AS T1) AS TotalDistance, '. 711 '(SELECT SUM(T2.Money) FROM (SELECT (SELECT Money FROM '.$Table.'Stat WHERE '.$Table.'Stat.'.$Table.' = '.$Table.'.Id ORDER BY Time DESC LIMIT 1) AS Money FROM '.$Table.' WHERE '.$Where.') AS T2) AS TotalMoney'); 712 712 $DbRow = $DbResult->fetch_assoc(); 713 713 return $DbRow;
Note:
See TracChangeset
for help on using the changeset viewer.