Hi, I am having a problem using a DataObject::get() call whereby I am using a couple of LEFT JOINs to try to get some filenames of some images associated with a page (associated by a ComplexTableField which creates its own table in the DB). The JOIN seems to work fine, I guess, however there doesn't seem to be any way to get the FIELDS from the JOINed table since I cannot modify the SELECT itself. Is there any way to do this?? I don't see the point of the JOIN if I cannot get these fields. I don't want to do a DB:query() call because I need all the results paging methods which I cloned from the Blog module.
CODE:
return DataObject::get("Page","`ParentID` = $this->ID AND ShowInMenus = 1 $tagCheck $catCheck $dateCheck","`GalleryPage`.Date DESC",'LEFT JOIN GalleryImageAttachment GIA ON GalleryPage_Live.ID = GIA.GalleryPageID LEFT JOIN File F ON F.ID = GIA.ImageID',"$start, $limit");
Need the filenames from the File table.
Help?
Thanks,
Garrett