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

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

  [复制链接]
 楼主| 发表于 2010 年 11 月 22 日 10:02:03 | 显示全部楼层
哦用了count(*)% Y5 f0 y. J. j% C
没用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
. F8 H* x' I9 p) v- L# s  F
+ F5 r' n& @9 U/ \% |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( R# I+ _3 M* q# v* W# E4 G
这个是显示发帖的楼层数
1 k; A, b8 F% C+ N9 m; X7 `) N( n
Jgwy.Com - Free Web Hosting Guide & Directory In China since 2001! Jgwy.Net-Jglt.Net
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025 年 6 月 3 日 19:40 , Processed in 0.097591 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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