Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 4, 20214 yr 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; }
February 19, 20214 yr Management 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 ) );