public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Get all of the associated parent data for the specified course unit.
 *
 * @since 1.0.0
 *
 * @param integer $post_id The ID of the course unit
 *
 * @return object The details of the parent objects, or false if there is no parent.
 */
Get all of the associated parent data for the specified course unit.

@param integer $post_id The ID of the course unit

@return object The details of the parent objects, or false if there is no parent.
Get all of the associated parent data for the specified course unit . @param integer $post_id The ID of the course unit @return object The details of the parent objects or false if there is no parent .
function WPCW_units_getAssociatedParentData( $post_id ) {
	global $wpcwdb, $wpdb;
	$wpdb->show_errors();
	$SQL = $wpdb->prepare( "
		SELECT *
		FROM $wpcwdb->units_meta um
		LEFT JOIN $wpcwdb->modules m ON m.module_id = um.parent_module_id
		LEFT JOIN $wpcwdb->courses c ON c.course_id = m.parent_course_id
		WHERE um.unit_id = %d AND course_title IS NOT NULL
	", $post_id );
	return $wpdb->get_row( $SQL );
}
function WPCW_units_getAssociatedParentData ( $ post_id ) { global $ wpcwdb , $ wpdb ; $ wpdb -> show_errors ( ) ; $ SQL = $ wpdb -> prepare ( " 
		SELECT *
		FROM  $ wpcwdb -> units_meta  um
		LEFT JOIN  $ wpcwdb -> modules  m ON m.module_id = um.parent_module_id
		LEFT JOIN  $ wpcwdb -> courses  c ON c.course_id = m.parent_course_id
		WHERE um.unit_id = %d AND course_title IS NOT NULL
	 " , $ post_id ) ; return $ wpdb -> get_row ( $ SQL ) ; }
Get all of the associated parent data for the specified course unit.
Get all of the associated parent data for the specified course unit .