select a_id,a_info,a_pic,a_size,a_url,a_fontcolor,a_type,a_date,a_days,a_tag from [Lebi_ad] where a_state = 1 and (a_type = 0 or a_type = 1 or a_type = 1) and (a_days = 0 or datediff('d',a_date,now())>= a_days) and instr(a_category,'11')>0