From 59e89fd53aedbfc7e5683956f50cd5f53f9a96f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Oct 2020 12:42:41 +0200 Subject: [PATCH] Fix --- htdocs/core/modules/mailings/fraise.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 5bf96f5afc1..deb39c495eb 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -248,8 +248,8 @@ class mailing_fraise extends MailingTargets $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; if (GETPOST('filter_category')) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_member as cm ON cm.fk_member = a.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = cm.fk_categorie ON c.rowid='".$this->db->escape(GETPOST('filter_category'))."'"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."categorie_member as cm ON cm.fk_member = a.rowid"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = cm.fk_categorie ON c.rowid='".$this->db->escape(GETPOST('filter_category'))."'"; } $sql .= " , ".MAIN_DB_PREFIX."adherent_type as ta"; $sql .= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false