找回密码
 注册
广告投放 虚位以待【阿里云】2核2G云新老同享 99元/年,续费同价做网站就用糖果主机-sugarhosts.comJtti.com-新加坡服务器,美国服务器,香港服务器
楼主: 聶十八

有懂SQL语句的帮金光整个法子

  [复制链接]
 楼主| 发表于 2010 年 11 月 22 日 10:02:03 | 显示全部楼层
哦用了count(*)  g! l2 s6 h- r
没用group by
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2010 年 11 月 22 日 10:22:18 | 显示全部楼层
【腾讯云】2核2G云服务器新老同享 99元/年,续费同价
文盲飘过
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2010 年 11 月 22 日 10:47:47 | 显示全部楼层
这个很难清出来吧?
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2010 年 11 月 22 日 11:00:04 | 显示全部楼层
试试我QQ群里发的,
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

发表于 2010 年 11 月 22 日 11:46:58 | 显示全部楼层
select author, count(*) from pre_forum_post_2 as b where b.fid='105' and b.tid='863265' and first=0 and mod(( select count(*) as dd from pre_forum_post_2 as a where a.fid='105' and a.tid='863265' and a.pid<b.pid order by pid) ,25)=0 group by author
5 \9 g% b7 t; N+ K3 }! e6 H2 G' ^* |2 Q8 i5 B' D' T; _6 H$ N
select ( select count(*) as dd from pre_forum_post_2 as a where  a.fid='105' and a.tid='863265' and a.pid<b.pid order by pid) as xuhao, author  from pre_forum_post_2 as b where b.fid='105' and b.tid='863265' and first=0 and mod(( select count(*) as dd from pre_forum_post_2 as a where  a.fid='105' and a.tid='863265' and a.pid<b.pid order by pid) ,25)=0- z) `! [! E* F& s9 X- }- Q8 w
这个是显示发帖的楼层数
) i; `, x; S, g0 D2 H3 _8 T5 E
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|金光论坛

GMT+8, 2025 年 2 月 12 日 17:44 , Processed in 0.026367 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表