mysql判断两个时间段是否有交集

    //判断两个时间段是否有交集
private function checkTimeCross($start_time,$end_time){
$sql = "select id from dkh_recharge_activity where ( status = 1 AND is_del = 0 ) AND ((start_time > {$start_time} AND start_time < {$end_time}) OR (start_time < {$start_time} AND end_time > {$end_time}) OR (end_time > {$start_time} AND end_time < {$end_time}))";
$getOne = $this->dkhRechargeActivityModel->baseExecuteSql($sql); return $getOne;
}
上一篇:查看 java 中的编译的字节码文件


下一篇:擠出機步進馬達的 Steps per Unit 該如何計算?