我看楼上的sql为什么不能写成这样呢
$sql = "
select * from (select top $recordcount id,
cate,
title,
nowtime,
view_times
from news
where visible=1
and cate in (1,2,3,4,5,6) --或者cate between 1 and 6
order by id desc
) a";
union all 的意思的不消除查询结果中的重复项,不知道我理解的是否正确,如有错误,请指正!谢谢
$sql = "
select * from (select top $recordcount id,
cate,
title,
nowtime,
view_times
from news
where visible=1
and cate in (1,2,3,4,5,6) --或者cate between 1 and 6
order by id desc
) a";
union all 的意思的不消除查询结果中的重复项,不知道我理解的是否正确,如有错误,请指正!谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货