Hi, I wonder if anyone can help.
I have two tables joined.
I need to join to this another table with two fields
tablewatches
WatchingUserID WatchedProfileI D
WatchingUserID = P.UserId
WatchedProfileI D = P.ProfileId
I need to then display the records where sum of WatchedProfileI D is the highest.
I imagine i need to add
but not sure how that fits with any join.
Any pointers would be great.
Thanks
Richard
I have two tables joined.
Code:
L.userid, p.profileid from tblLoginDatabase L inner JOIN tblProfilesDatabase P ON L.UserId = P.UserId"
I need to join to this another table with two fields
tablewatches
WatchingUserID WatchedProfileI D
WatchingUserID = P.UserId
WatchedProfileI D = P.ProfileId
I need to then display the records where sum of WatchedProfileI D is the highest.
I imagine i need to add
Code:
SUM(tablewatches.WatchedProfileID) AS totalhits from but get error 500
Any pointers would be great.
Thanks
Richard
Comment