aaad - 2014/8/5 11:29:52
我的弹出广告是通知公告栏目,广告设置内容代码是
<script type="text/javascript">
location.href="/e/zdymodel/article/custom/153.aspx?siteid=1&sortid=0&pagesize=20&sqlorder=id desc;"
</script>
上述设置不能在弹出框控制信息条数,超过20余条,请问怎样控制信息条数。谢谢
xiyou - 2014/8/5 11:40:55
如果模型中你用了默认Get_Data()来获取数据,超过会自动换行
如果只想显示前20条可以用用自定义sql
Get_Data(”select top 20 from 表名 where site_id=1 order by id desc“)
aaad - 2014/8/6 11:15:14
在 e/zdymodel/article/custom/153.aspx内修改提示错误。
xiyou - 2014/8/6 11:48:02
aaad - 2014/8/6 15:24:52
dt=Get_Data("select * from article where sort_id=635 order by thedate desc");把*改成top 20 不行啊。提示错误。
scstjcy - 2014/8/6 16:09:57
“*”还是要,在星号后面加“top 20”
xiyou - 2014/8/6 16:12:56
Get_Data(”select top 20 * from 表名 where site_id=1 order by id desc“)
少写了一个*号
aaad - 2014/8/7 9:28:17
谢谢,*前加 top 20 ,问题解决,还以为*代表所有呐。