Michael.J Posted January 4, 2021 Posted January 4, 2021 I've been using constructLoadQuery to add table joins for member and group data without any problems but this won't work with the forums database. I assume due to the node permissions. Is there a work around for this or should I just use get_fieldname and cache my database queries? (I've got several fields in the table I want to join with forum data.) protected static function constructLoadQuery( $id, $idField, $extraWhereClause ) { /* Get parent contruct query */ $parentDB = parent::constructLoadQuery( $id, $idField, $extraWhereClause ); /* Add our custom join */ $parentDB->join( 'basicpoints_forums', 'basicpoints_forums.forum_id=forums_forums.id' ); /* Return all */ return $parentDB; }
Management Matt Posted February 19, 2021 Management Posted February 19, 2021 What is the MySQL error? It might just be a case of using arrays and parenthesis. I've often been tripped up with the difference between:$extraWhereClause = array( 'foo=?', $foo ); and:$extraWhereClause = array( array( 'foo=?', $foo ) );
Recommended Posts