请高手指点此语句怎么写?

xinyu1225 2004-07-15 10:04:15
两个表cont(文章集),type(文章所属类别集)
cont:
c_id c_title c_content t_id c_time

type:
t_id t_name

文章所属类别菜单已经写出,我想统计分类文章数目,应该怎样实现,此语句怎么写?

类型1:x条
类型2:y条
...
...全文
71 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xinyu1225 2004-07-15
  • 打赏
  • 举报
回复
哪位朋友能把实现这个效果的代码全部写出来,或者给一个比较详细的例子也可以,我按上面的写了没有显示出分类文章的总数,不晓得怎么回事,还请高手指点,谢谢!
Shiro8558 2004-07-15
  • 打赏
  • 举报
回复
select a.t_name,count(b.c_id) from type a,cont b where a.t_id=b.t_id group by a.t_name
t_id t_name一一对应?
gamegod 2004-07-15
  • 打赏
  • 举报
回复
select a.t_name,count(b.c_id) from type a,cont b where a.t_id=b.t_id group by a.t_id

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧