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_status_in( string $column = 'status' )

Generate an SQL IN clause based on submitted status arguments


Parameters Parameters

$column

(string) (Optional) Name of the column.

Default value: 'status'


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class.llms.student.query.php

406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
private function sql_status_in( $column = 'status' ) {
    global $wpdb;
    $comma    = false;
    $statuses = array();
    $sql      = '';
    foreach ( $this->get( 'statuses' ) as $status ) {
        $sql       .= $comma ? ',%s' : '%s';
        $statuses[] = $status;
        $comma      = true;
    }
 
    $sql = $wpdb->prepare( $sql, $statuses ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    return "{$column} IN ( {$sql} )";
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.