帖子浏览
|
用户名:小西 用户ID:1 用户级别:17管理员 注册时间:2006-08-10 论坛分数:32445 |
百度知道上问到的select board_id,(select count(*) from tbllists_old as B where parentid>0 and B.board_id=A.board_id) as CS1,(select count(*) from tbllists_old as B where parentid=0 and B.board_id=A.board_id) as CS2,(select count(*) from tbllists_old as B where datediff("d",a_date,now)<15 and b.board_id=A.board_id) as CT from tbllists_old as A group by board_id<br/><br/>以前N次查询的问题一个语句搞定。长知识了。
个人签名:
我的签名测试 |
本主题讨论树
回复本帖
请先 登录,再回复本帖。
百度知道上问到的