Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Student_Query::sql_joins()
Setup joins based on submitted sort and search args
Description Description
Return Return
(string)
Source Source
File: includes/class.llms.student.query.php
private function sql_joins() { global $wpdb; $joins = array(); $fields = array( 'first_name' => "JOIN {$wpdb->usermeta} AS m_first ON u.ID = m_first.user_id AND m_first.meta_key = 'first_name'", 'last_name' => "JOIN {$wpdb->usermeta} AS m_last ON u.ID = m_last.user_id AND m_last.meta_key = 'last_name'", 'overall_progress' => "JOIN {$wpdb->usermeta} AS m_o_p ON u.ID = m_o_p.user_id AND m_o_p.meta_key = 'llms_overall_progress'", 'overall_grade' => "JOIN {$wpdb->usermeta} AS m_o_g ON u.ID = m_o_g.user_id AND m_o_g.meta_key = 'llms_overall_grade'", ); // add the fields to the array of fields to select foreach ( $fields as $key => $statment ) { if ( $this->requires_field( $key ) ) { $joins[] = $statment; } } $sql = implode( ' ', $joins ); if ( $this->get( 'suppress_filters' ) ) { return $sql; } return apply_filters( $this->get_filter( 'join' ), $sql, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |