I'm trying to implement a custom search and am linking two tables together using LEFT JOIN. Below is the query I am running:
$links = DataObject::get("SiteTree", "ShowInMenus = 1 AND ParentID = 23", "", "LEFT JOIN ConsultationPaperHolder ON ConsultationPaperHolder.ID = SiteTree.ID", "0, 10");
It's supposed to join my ConsultationPaperHolder to the SiteTree table using ID. The problem is it keeps bringing back an Error page. It works withou the JOIN but just can't get it working with it.
anybody have any ideas whats wrong with this?