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_select()
Setup the SQL for the select statement
Description Description
Return Return
(string)
Source Source
File: includes/class.llms.student.query.php
private function sql_select() { $selects = array(); // always select the ID $selects[] = 'u.ID as id'; // always add the subqueries for enrollment status $selects[] = "( {$this->sql_subquery( 'meta_value' )} ) AS status"; // all the possible fields $fields = array( 'date' => "( {$this->sql_subquery( 'updated_date' )} ) AS `date`", 'last_name' => 'm_last.meta_value AS last_name', 'first_name' => 'm_last.meta_value AS first_name', 'email' => 'u.user_email AS email', 'registered' => 'u.user_registered AS registered', 'overall_progress' => 'CAST( m_o_p.meta_value AS decimal( 5, 2 ) ) AS overall_progress', 'overall_grade' => 'CAST( m_o_g.meta_value AS decimal( 5, 2 ) ) AS overall_grade', ); // add the fields to the array of fields to select foreach ( $fields as $key => $statment ) { if ( $this->requires_field( $key ) ) { $selects[] = $statment; } } $sql = implode( ', ', $selects ); if ( $this->get( 'suppress_filters' ) ) { return $sql; } return apply_filters( $this->get_filter( 'select' ), $sql, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |