Click here to Skip to main content
12,896,806 members (59,876 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
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]
Posted 7-Dec-12 22:35pm
Updated 7-Dec-12 22:38pm
OriginalGriff 8-Dec-12 4:38am
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Member 9027346 8-Dec-12 4:47am
k.i dont want to shout.. bymistake i wrote in capital letters..sry for that...n thanks for telling me.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

See this thread...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 8 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100