Axel Nordh 4 лет назад
Родитель
Сommit
074bceb9c6
2 измененных файлов с 4 добавлено и 19 удалено
  1. 3 1
      OddsJavaFx/src/web/matchTable.php
  2. 1 18
      OddsJavaFx/src/web/webDbConnection.php

+ 3 - 1
OddsJavaFx/src/web/matchTable.php

@@ -10,6 +10,8 @@ $leagueId = $_POST['leagueSelector'];
 
 echo "Country id: " . $countryId . " leagueId: " . $leagueId;
 
-$conn->getMatches($countryId, $leagueId);
+$matches = $conn->getMatches($countryId, $leagueId);
 
+
+var_dump($matches[0]);
 ?>

+ 1 - 18
OddsJavaFx/src/web/webDbConnection.php

@@ -108,25 +108,8 @@ class WebDbConnection {
             
             echo "</br></br> matchDoneEdit added percentages " . $homeWinPercent . ", $drawPercent, $awayWinPercent </br>";
             var_dump($match);
-            die();
-/*            
-            
-            final float homeWinPercent = (homeTeamResults.getWins() + awayTeamResults.getLosses()) / Float.valueOf(homeTeamResults.getCount() + awayTeamResults.getCount())* 100;
-            final float drawPercent = (homeTeamResults.getDraws() + awayTeamResults.getDraws()) / Float.valueOf(homeTeamResults.getCount() + awayTeamResults.getCount()) * 100;
-            final float awayWinPercent = (homeTeamResults.getLosses() + awayTeamResults.getWins()) / Float.valueOf(homeTeamResults.getCount() + awayTeamResults.getCount()) * 100;
-            
-            match.put("homeWin", String.format("%.02f", homeWinPercent) + "(" + String.format("%.02f", (100 / homeWinPercent) * betMargin) + ")");
-            match.put("draw", String.format("%.02f", drawPercent) + "(" + String.format("%.02f", (100 / drawPercent ) * betMargin) + ")");
-            match.put("awayWin", String.format("%.02f", awayWinPercent) + "(" + String.format("%.02f", (100 / awayWinPercent) * betMargin) + ")");
-            
-            matches.add(match);
         }
-        
-        originalMatches = matches;
-        matchTable.getItems().addAll(matches);
-        */
-        }
-        
+        return $matches;
     }
     
     private function getLeagueInfo($leagueId) {