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_subquery( string $column, string $meta_key = '_status' )
Generate an SQL subquery for the meta key in the main query.
Parameters Parameters
- $column
-
(string) (Required) Column name.
- $meta_key
-
(string) (Optional) meta key to use in the WHERE condition. Defaults to '_status'.
Default value: '_status'
Return Return
(string)
Source Source
File: includes/class.llms.student.query.php
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} )";
}
/**
* Generate an SQL subquery for the meta key in the main query.
*
* @since 3.13.0
* @since 5.10.0 Add `$meta_key` argument.
*
* @param string $column Column name.
* @param string $meta_key Optional meta key to use in the WHERE condition. Defaults to '_status'.
* @return string
*/
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.10.0 | Add $meta_key argument. |
| 3.13.0 | Introduced. |