Payout bugfix
This commit is contained in:
parent
922db48c36
commit
622ecaf97c
8 changed files with 73 additions and 54 deletions
|
|
@ -156,6 +156,21 @@ class Round extends Model
|
|||
return null;
|
||||
}
|
||||
|
||||
public static function getCount($seasonId=-1) {
|
||||
$season=null;
|
||||
if ($seasonId==-1) {
|
||||
$season=Season::getCurrent();
|
||||
} else {
|
||||
$season=Season::where('id','=', $seasonId)->first();
|
||||
}
|
||||
if (!$season) return 0;
|
||||
|
||||
$rounds=Round::where('season_id','=',$season->id)->get();
|
||||
|
||||
|
||||
return sizeof($rounds);
|
||||
}
|
||||
|
||||
// TODO: CHeck : Unused ??
|
||||
public static function getClosestRoundToNow() {
|
||||
$sql="select round_id,DATEDIFF(NOW(),kickoff) from games order by 2 desc limit 1;";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue