Still working on the date range
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Aug 2016 19:51:59 +0000 (15:51 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Aug 2016 19:51:59 +0000 (15:51 -0400)
Trying it with both set to 1 week and 1 month

models/admin/ajax/statCollector.php

index 990f026..e3a9d19 100644 (file)
@@ -148,7 +148,7 @@ class GlmMembersAdmin_ajax_statCollector
             $last_stat_date = $stat_date->format( 'Y-m-d' );
         }
         $current_date = new DateTime();
-        $current_date->modify( '+ 2 weeks' );
+        $current_date->modify( '+ 1 weeks' );
         $results = $this->wpdb->get_results(
             $this->wpdb->prepare(
                 "SELECT count(id) as leads_count,DATE_FORMAT(date_submitted, '%%Y%%U') as weekly
@@ -196,7 +196,7 @@ class GlmMembersAdmin_ajax_statCollector
             $last_stat_date = $stat_date->format( 'Y-m-d' );
         }
         $current_date = new DateTime();
-        $current_date->modify( '+ 2 months' );
+        $current_date->modify( '+ 1 months' );
         $sql = "
           SELECT count(id) as leads_count,DATE_FORMAT(date_submitted, '%Y%m') as monthly
             FROM " . GLM_MEMBERS_LEADS_PLUGIN_DB_PREFIX . "lead_entry