最大值判断添加

master
zhengyongxing 4 years ago
parent 4dd097667f
commit 1717c2958b

@ -1616,9 +1616,16 @@ class MarketPercentageController extends ThinkController
} }
if ($_POST['end_time']) {
$belong_game = M("company_belong_game","tab_") $belong_game = M("company_belong_game","tab_")
->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}") ->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}")
->select(); ->select();
} else {
$belong_game = M("company_belong_game","tab_")
->where("(begin_time>={$time_start} or (end_time >={$time_start})) and id != {$id}")
->select();
}
if ($belong_game) { if ($belong_game) {

Loading…
Cancel
Save