select * from t_class_info where date_format(now(),'%Y-%m-%d-%H-%i-%S')>=begin_date and date_format(now(),'%Y-%m-%d-%H-%i-%S')<=date_format(end_date,'%Y-%m-%d-24-00-00') 關(guān)鍵是這句: date_format(now(),'%Y-%m-%d-%H-%i-%S')<=date_format(end_date,'%Y-%m-%d-24-00-00')