wip db
This commit is contained in:
1 parent
4dd741e60b
commit
10429f0595
1 file changed
+18
-10
@@ -40,17 +40,25 @@ class ActiveSpread
|
||||
DB::table($table)->where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->update(['active_spread' => 0]);
|
||||
|
||||
if (in_array($table, ['odds_points', 'odds_points_ht', 'odds_points_q1'])) {
|
||||
DB::table($table)
|
||||
->where('event_id', $event_id)
|
||||
->where('bookmaker_id', $bookmaker_id)
|
||||
->where('handicap', (float) $value['active_spread'])
|
||||
->update(['active_spread' => 1]);
|
||||
|
||||
DB::transaction(function () use ($table, $event_id, $bookmaker_id, $value) {
|
||||
DB::table($table)
|
||||
->where('event_id', $event_id)
|
||||
->where('bookmaker_id', $bookmaker_id)
|
||||
->where('handicap', (float) $value['active_spread'])
|
||||
->update(['active_spread' => 1]);
|
||||
}, 5);
|
||||
|
||||
} else {
|
||||
DB::table($table)
|
||||
->where('event_id', $event_id)
|
||||
->where('bookmaker_id', $bookmaker_id)
|
||||
->where('total', (float) $value['active_spread'])
|
||||
->update(['active_spread' => 1]);
|
||||
|
||||
DB::transaction(function () use ($table, $event_id, $bookmaker_id, $value) {
|
||||
DB::table($table)
|
||||
->where('event_id', $event_id)
|
||||
->where('bookmaker_id', $bookmaker_id)
|
||||
->where('total', (float) $value['active_spread'])
|
||||
->update(['active_spread' => 1]);
|
||||
}, 5);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user