计数功能有问题 [英] Problem with count function

查看:78
本文介绍了计数功能有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有gridview。我想根据profile_id显示照片,视频,歌曲的总数。这个字段在不同的table.mns照片在照片表中,音频在不同的表等,profile_id也在所有表中。 Bt我想在同一个gridview中显示。



gridview应该采用以下格式:

profile_id | no of photo | no of audio,no of video



[edit] SHOUTING删除 - OriginalGriff [/ edit]

I have gridview. I want to disply total number of photo,video,songs according to profile_id. This fields are in different table.mns photo in photo table,audio in different table etc and profile_id also in all table. Bt I want to show in same gridview.

gridview should be in following format:
profile_id| no of photo|no of audio,no of video

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

请参阅此 主题 ...
See this thread...


这是您在单个查询中获得照片,视频和歌曲表总数的方式。
This is the way you will get total count of photo, video and songs table in single query.
select Count(*) as 'Photo ', count(*)as 'Video', count(*) as 'Songs' 
from photo,video,Songs


这篇关于计数功能有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆