public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Fetch a list of courses for the specified user.
 *
 * @since 1.0.0
 *
 * @param integer $user_id The ID of the user to get the course list for.
 *
 * @return array The list of courses for this user (or false if there are none).
 */
Fetch a list of courses for the specified user.

@param integer $user_id The ID of the user to get the course list for.

@return array The list of courses for this user (or false if there are none).
Fetch a list of courses for the specified user . @param integer $user_id The ID of the user to get the course list for . @return array The list of courses for this user ( or false if there are none ) .
function WPCW_users_getUserCourseList( $user_id ) {
	global $wpdb, $wpcwdb;
	$wpdb->show_errors();
	$courseData = $wpdb->get_results( $wpdb->prepare( "
    	SELECT *
    	FROM $wpcwdb->user_courses uc
		LEFT JOIN  $wpcwdb->courses c ON c.course_id = uc.course_id
   		WHERE user_id = %d
   		ORDER BY course_title ASC
    ", $user_id ) );
	return $courseData;
}
function WPCW_users_getUserCourseList ( $ user_id ) { global $ wpdb , $ wpcwdb ; $ wpdb -> show_errors ( ) ; $ courseData = $ wpdb -> get_results ( $ wpdb -> prepare ( " 
    	SELECT *
    	FROM  $ wpcwdb -> user_courses  uc
		LEFT JOIN   $ wpcwdb -> courses  c ON c.course_id = uc.course_id
   		WHERE user_id = %d
   		ORDER BY course_title ASC
     " , $ user_id ) ) ; return $ courseData ; }
Fetch a list of courses for the specified user.
Fetch a list of courses for the specified user .