Apr 13, 2012 07:37 PM|mclazarini|LINK
I tried very hard to understand how it works but I still can´t write de correct code.
I changed two things...
user = db.QuerySingle("SELECT
UserId, DisplayName, Bio FROM UserProfiles WHERE UserId = @0",
var galleries = db.Query(@"SELECT from Galleries.Id, Galleries.Name, where UserId = user, COUNT(Photos.Id) AS PhotoCount FROM Galleries, LEFT OUTER JOIN Photos ON Galleries.Id = Photos.GalleryId GROUP BY Galleries.Id, Galleries.Name").ToList(); }
The error is in the var galleries because the "var user" is ok.
What I need is to select just the photos that each member uploaded. In the original template any member can see all the photos and I need to change to a personal gallery, which just who uploaded the photo can see it.
Thanks a lot,