mysql - I want to find current and upcoming shows record -
i have created schedule
table. in there column sc_show_time
. have inserted show_time - 15:00:00, 17:00:00, 21:00:00. suppose current time 18:00:00. want 17:00:00, 21:00:00 these 2 records.
thanx in advance
try query current show :
select * shedule sc_show_date = curdate() , sc_show_time < curtime() order sc_show_time desc limit 1
next shows :
select * shedule sc_show_date = curdate() , sc_show_time > curtime() order sc_show_time asc
Comments
Post a Comment