|
主题:求助sql调用 [收藏主题] | 转到: |
求助sql,调用某栏目8篇文章,但除去最新的2条头条新闻。 select top {$Param(0)} ID,Tid,Title,Adddate from KS_Article where Tid ='{$Param(2)}' and ID not in (select top {$Param(1)} ID from KS_Article where Strip='1' and Tid ='{$Param(2)}' order by Adddate desc ) order by Adddate desc 调用标签: {SQL_新闻资讯(8,2,20125443799343)} 调不出来,问题在吗?谢谢啊。 |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
问题找到了。 正解: select top {$Param(0)} ID,Tid,Title,Adddate from KS_Article where ID not in (select top {$Param(1)} ID from KS_Article where Strip=1 and Tid ='{$Param(2)}' or Strip=1 and Tid ='{$Param(3)}' order by id desc ) and Tid ='{$Param(2)}' or ID not in (select top {$Param(1)} ID from KS_Article where Strip=1 and Tid ='{$Param(2)}' or Strip=1 and Tid ='{$Param(3)}' order by id desc ) and Tid ='{$Param(3)}' order by id desc |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |