$sql='select * from think_mytask where strtotime(starttime)<=$time and="">=$time';应该是这样吧$sql='select * from think_mytask where strtotime(starttime)<=$time and strtotime(endtime )>=$time';