It looks like you're new here. If you want to get involved, click one of these buttons!
$this->FireEvent('AfterGetFullQuery');$this->SQLAny chance for this change to go mainstream so that I can update by VanillaBB in the feature? It works perfectly for me and it won't do any harm IMHO.
->Select('c.Name, c.CategoryID, c.TreeRight, c.TreeLeft, c.Depth, c.Description, c.CountDiscussions, c.CountComments, c.UrlCode, c.LastCommentID, c.PermissionCategoryID')
->Select('co.DateInserted', '', 'DateLastComment')
->Select('co.InsertUserID', '', 'LastCommentUserID')
->Select('cu.Name', '', 'LastCommentName')
->Select('cu.Photo', '', 'LastCommentPhoto')
->Select('co.DiscussionID', '', 'LastDiscussionID')
->Select('d.Name', '', 'LastDiscussionName')
->From('Category c')
->Join('Comment co', 'c.LastCommentID = co.CommentID', 'left')
->Join('User cu', 'co.InsertUserID = cu.UserID', 'left')
->Join('Discussion d', 'd.DiscussionID = co.DiscussionID', 'left')
->Where('c.AllowDiscussions', '1');
Comments
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]