function to find total number of students in wplms code example
Example: function to find total number of students in wplms
global $wpdb;
$query = $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = %d AND meta_value > UNIX_TIMESTAMP( NOW() )", $course_id );
return $wpdb->get_col( $query );