Function Reference: geodir_get_package_info_by_id

Summary

This function has not been documented yet.

Source Code

function geodir_get_package_info_by_id( $pid, $status = '1' ) {
	global $wpdb;
	
	if ( !$pid > 0 ) {
		return NULL;
	}
	
	$where = '';
	if ( $status == '1' ) {
		$where = "AND status = '1'";
	} else if ( $status == '0' ) {
		$where = "AND status != '1'";
	}
	
	$query = $wpdb->prepare( "SELECT * FROM " . GEODIR_PRICE_TABLE . " WHERE pid = %d " . $where, array( $pid ) );
	$row = $wpdb->get_row( $query );
	
	return $row;	
}