query select topic_data.* from topic_data where topic_data.categori='1' and topic_data.del=0 and topic_data.view=0 and(now() between viewstartdate and viewenddate or everyview=1) order by topic_data.no asc, topic_data.id desc limit ,10