* Plugin Name: GLM Members Database Events
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 1.6.22
+ * Version: 1.6.23
* Author: Chuck Scott
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabaseEventsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.6.22
+ * @version 1.6.23
*/
/*
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.22');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.23');
define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.1');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
AND DATE(start_time) >= %s";
if ( $member_id = filter_var( $member_id, FILTER_VALIDATE_INT ) ) {
- $sql .= " AND ref_dest = " . $member_id;
+ $sql .= " AND event in (SELECT id FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events
+ WHERE ref_dest = " . $member_id . ")";
}
return $this->wpdb->get_var( $this->wpdb->prepare( $sql, $from ) );
}