Also update how it is getting the member info record that is active when
it needs it for printing the coupons.
SELECT m.member_name, addr1,c.name as city,state,zip
FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info m
LEFT OUTER JOIN " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "cities c ON (c.id = m.city)
- WHERE m.id = {$id}";
+ WHERE m.member = {$id}
+ AND m.status = 10";
$results = $wpdb->get_results($sql, ARRAY_A);
if ($results[0]) {
$address = array();
/**
* Plugin Name: Gaslight Media Coupons
* Description: Coupon Application for Gaslight Media Clients.
- * Version: 0.1.0 Beta
+ * Version: 0.1.1 Beta
* Author: Steve Sutton
* Author URI: http://www.gaslightmedia.com
* License: All right reserved
return false;
} else {
$sql = "
- SELECT id,member_name as name
- FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "member_info
- WHERE status = 10
- ORDER BY member_name";
+ SELECT id,name
+ FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "members
+ ORDER BY name";
$results = $wpdb->get_results($sql, ARRAY_A);
foreach ($results as $row) {
$members[] = $row;