fixing the sql query for getting front page dates by search to only show
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 30 Jan 2017 20:53:10 +0000 (15:53 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 30 Jan 2017 20:53:10 +0000 (15:53 -0500)
events that are active, status = 10

models/admin/ajax/eventsCalMonthAJAX.php

index e24d367..664d60c 100644 (file)
@@ -137,7 +137,7 @@ class GlmMembersAdmin_ajax_eventsCalMonthAJAX extends GlmDataEventsTimes
             $year  = $date['year'];
             $image_url = GLM_MEMBERS_PLUGIN_MEDIA_URL . '/images/small/';
             
-            $sql = "SELECT * FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX ."events WHERE id IN (SELECT event FROM ";
+            $sql = "SELECT * FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX ."events WHERE status = 10 AND id IN (SELECT event FROM ";
             $sql .= GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times WHERE YEAR(start_time) = $year AND MONTH(start_time) = $month AND active = 1 ORDER BY start_time ) LIMIT 3; ";
             $events = $wpdb->get_results($sql);