Last active
September 21, 2018 18:14
-
-
Save seanwittmeyer/d1f200119db12f0c277f26252cdd382d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # listgames.php | |
require_once ('include/dbclass.php'); | |
$db = new Db(); | |
$week = '1'; | |
$row = $db -> select("select favorite,favscore,spread,underdog,undscore,home from 2018games where week='$week' order by game"); | |
$ng = count($row); | |
for ($j=0; $j<$ng; $j++) { | |
$favscore = $row[$j]["favscore"]; $fav = $row[$j]["favorite"]; | |
$undscore = $row[$j]["undscore"]; $und = $row[$j]["underdog"]; | |
$spread = $row[$j]["spread"]; $home = $row[$j]["home"]; | |
$arr['week'] = $week; | |
$arr['fav'] = $fav; | |
$arr['spread'] = $spread; | |
$arr['underdog'] = $und; | |
$arr['favorite'] = $home; | |
$bigarr[] = $arr; | |
unset($arr); | |
#printf("%s %4.1f %s %s \n",$fav,$spread,$und,$home); | |
} | |
echo json_encode($bigarr); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment