Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Test Wp-statistics Pages list
if ( $rangestartdate != null && $rangeenddate != null ) {
$result = $wpdb->get_results( $wpdb->prepare( "SELECT `uri`,`id`,`type` FROM {$wpdb->prefix}statistics_pages WHERE `date` BETWEEN %s AND %s GROUP BY `uri`", $rangestartdate, $rangeenddate ), ARRAY_N );
} else {
$result = $wpdb->get_results( "SELECT `uri`,`id`,`type` FROM {$wpdb->prefix}statistics_pages GROUP BY `uri`", ARRAY_N );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment