public_html/wp-content/plugins/wp-statistics/includes/functions/functions.php
// This function returns the count of a given user agent in the database.
This function returns the count of a given user agent in the database.
This function returns the count of a given user agent in the database .
function wp_statistics_useragent( $agent, $rangestartdate = null, $rangeenddate = null ) {
		global $wpdb;
		if( $rangestartdate != null && $rangeenddate != null ) {
			$result = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(agent) FROM {$wpdb->prefix}statistics_visitor WHERE `agent` = %s AND `last_counter` BETWEEN %s AND %s", $agent, $rangestartdate, $rangeenddate ) );
		} else {
			$result = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(agent) FROM {$wpdb->prefix}statistics_visitor WHERE `agent` = %s", $agent ) );
		}
		return $result;
	}
function wp_statistics_useragent ( $ agent , $ rangestartdate = null , $ rangeenddate = null ) { global $ wpdb ; if ( $ rangestartdate != null && $ rangeenddate != null ) { $ result = $ wpdb -> get_var ( $ wpdb -> prepare ( " SELECT COUNT(agent) FROM  { $ wpdb -> prefix } statistics_visitor WHERE `agent` = %s AND `last_counter` BETWEEN %s AND %s " , $ agent , $ rangestartdate , $ rangeenddate ) ) ; } else { $ result = $ wpdb -> get_var ( $ wpdb -> prepare ( " SELECT COUNT(agent) FROM  { $ wpdb -> prefix } statistics_visitor WHERE `agent` = %s " , $ agent ) ) ; } return $ result ; }
This function returns the count of a given user agent in the database.
This function returns the count of a given user agent in the database .