Kaynağa Gözat

Rättat sql

Axel Nordh 4 yıl önce
ebeveyn
işleme
7c2acffafe

+ 1 - 1
OddsJavaFx/src/web/index.php

@@ -111,8 +111,8 @@ $dayStats = $conn->getDayBettingsStats();
 <th>Resultat</th>
 <th>Games Played</th>
 <th>Bet amount</th>
-<th>Unresolved</th>
 <th>Wins</th>
+<th>Unresolved</th>
 </tr>
 </thead>
 <tbody>

+ 2 - 2
OddsJavaFx/src/web/webDbConnection.php

@@ -182,12 +182,12 @@ SUM(
         WHEN betOn = 'X' AND sr.homeScore = sr.awayScore AND homeScore > -1 AND awayScore > -1 THEN 1
         WHEN betOn = '2' AND sr.homeScore < sr.awayScore AND homeScore > -1 AND awayScore > -1 THEN 1
 		ELSE 0
-	END as wins, 
+	END) as wins, 
 SUM(
     CASE
         WHEN homeScore <= -1 AND awayScore <= -1 THEN 1
 		ELSE 0
-	END as pending
+	END) as pending,
 SUM(amount) as betAmount, 
 COUNT(gameDate) as numGames
 FROM `Bets` INNER JOIN SoccerResults sr ON matchId = sr.id GROUP BY DATE(sr.gameDate) ORDER BY sr.gameDate ASC";