This is what I have so far, all for asp.net:
repeater1: "SELECT UserName, LastLogin, DateCreated, Views, Logged,
(SELECT COUNT(AlbumID) FROM ProfileAlbums WHERE UserID=?) As TotalAlbums,
(SELECT COUNT(FriendID) FROM ProfileFriends WHERE UserID=?) As CountFriends,
(SELECT COUNT(CommentID) FROM ProfileComments WHERE ReceiveUserID=?) As
CommentsCount FROM Users WHERE UserID=? LIMIT 1"
repeater2: "SELECT AlbumID FROM ProfileAlbums WHERE UserID=? LIMIT 4"
repeater3: "SELECT MainPic As FriendMainPic FROM Users WHERE UserID IN
(SELECT FriendID FROM ProfileFriends WHERE UserID=?) LIMIT 12"
repeater4: "SELECT ProfileComments.PostUserID, ProfileComments.DateCreated,
ProfileComments.Comment, Users.UserName As PostUserName, Users.MainPic FROM
ProfileComments INNER JOIN Users ON Users.UserID=ProfileComments.PostUserID WHERE
ProfileComments.ReceiveUserID=? LIMIT 25"
I am not sure if it is possible to grab 4 queries with different limit sizes, not to mention if it is smart to bind 4 controls with tons of information rather than take the query hits. It's a profile section, much like myspace's. All by client's request.
Last edited by SheSaidImaPregy : Nov 8th, 2007 at 2:39 pm.