$where['time'] = array('between', array($starttime,$enttime));

转载:http://www.thinkphp.cn/topic/26186.html