public_html/wp-content/plugins/wp-statistics/includes/functions/functions.php
// This function returns all unique versions for a given agent from the database.
This function returns all unique versions for a given agent from the database.
This function returns all unique versions for a given agent from the database .
function wp_statistics_agent_version_list( $agent, $rangestartdate = null, $rangeenddate = null ) {
		global $wpdb;
		if( $rangestartdate != null && $rangeenddate != null ) {
			$result = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT version FROM {$wpdb->prefix}statistics_visitor WHERE agent = %s AND `last_counter` BETWEEN %s AND %s", $agent, $rangestartdate, $rangeenddate ), ARRAY_N );
		} else {
			$result = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT version FROM {$wpdb->prefix}statistics_visitor WHERE agent = %s", $agent ), ARRAY_N );
		}
		$Versions = array();
		foreach( $result as $out )
			{
			$Versions[] = $out[0];
			}
		return $Versions;
	}
function wp_statistics_agent_version_list ( $ agent , $ rangestartdate = null , $ rangeenddate = null ) { global $ wpdb ; if ( $ rangestartdate != null && $ rangeenddate != null ) { $ result = $ wpdb -> get_results ( $ wpdb -> prepare ( " SELECT DISTINCT version FROM  { $ wpdb -> prefix } statistics_visitor WHERE agent = %s AND `last_counter` BETWEEN %s AND %s " , $ agent , $ rangestartdate , $ rangeenddate ) , ARRAY_N ) ; } else { $ result = $ wpdb -> get_results ( $ wpdb -> prepare ( " SELECT DISTINCT version FROM  { $ wpdb -> prefix } statistics_visitor WHERE agent = %s " , $ agent ) , ARRAY_N ) ; } $ Versions = array ( ) ; foreach ( $ result as $ out ) { $ Versions [ ] = $ out [ 0 ] ; } return $ Versions ; }
This function returns all unique versions for a given agent from the database.
This function returns all unique versions for a given agent from the database .