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

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

  [复制链接]
 楼主| 发表于 2010 年 11 月 22 日 10:02:03 | 显示全部楼层
哦用了count(*)/ }# n8 m2 f0 g" c3 X, u( {/ m
没用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
4 P0 e1 ]0 ^2 Q) A
; {0 R2 D% s+ |4 S: [7 R3 s8 Rselect ( 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
7 N# Q' C1 g. q% Z" E2 E2 O6 g5 f这个是显示发帖的楼层数
2 N" T3 L9 S4 m
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025 年 2 月 12 日 17:38 , Processed in 0.025652 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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