Click here to Skip to main content
Rate this: bad
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
Edited 7-Dec-12 22:38pm
OriginalGriff at 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 at 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
0 OriginalGriff 554
1 Gihan Liyanage 338
2 RyanDev 248
3 Sergey Alexandrovich Kryukov 243
4 ChauhanAjay 220
0 Sergey Alexandrovich Kryukov 9,011
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928

Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 8 Dec 2012
Copyright © CodeProject, 1999-2014
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