用帝国ECMS 5.1整合PHPwind论坛,在ECMS首页用sql查询调用论坛所有栏目中最新的帖子:
'select subject as title,tid as id from pw_threads order by tid desc limit 10' 现在我想随机调出论坛中最近15天最热门的帖子,请问应怎样修改?
'select subject as title,tid as id from pw_threads order by tid desc limit 10' 现在我想随机调出论坛中最近15天最热门的帖子,请问应怎样修改?
解决方案 »
- Mysql MyISAM数据库引擎发音
- C语言调用mysql存储过程出错 急急急!!!!
- MySql与sqlite的优缺点点对比!
- mysql流水账记录统计查询。记录和记录之间进行运算比较
- mysql简单查询问题(关于查询条件)
- select t1.a, t1.b, t2.c, t2.d from t1, t2 while (t1.a = t2.a and t2.a = 5)
- 请教 update 语句
- XPHome支持mysql的安装吗?
- 怎样从mysql中读取一个图片并在浏览器中显示出来呢?
- mysql可以启动,但不兼容,怎么解决
- My Sql5.0怎么不能创建存贮过程?
- mysql经典问题,谁遇到过?
subject as title,
tid as id
from pw_threads
where date_sub(curdate(),interval 15 day) <= date(时间字段) --最近15天
order by rand() limit 10 --随机取10条
'select subject as title, tid as id from pw_threads where date_sub(curdate(), interval 15 day) <= date(15) order by rand() limit 10'
'select subject as title, tid as id from pw_threads where date_sub(curdate(), interval 15 day) order by rand() limit 10'
'select subject as title, tid as id from pw_threads where date_sub(curdate(), interval 15 day) order by rand() limit 10'