From 336820bacc838c99ed215c4901c9b50cad903bb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 19 Jul 2010 09:42:59 +0200 Subject: [PATCH] Fixes weekly registration email sql query. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- bin/cron/registrations.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/cron/registrations.php b/bin/cron/registrations.php index 3b997a1..75ac753 100755 --- a/bin/cron/registrations.php +++ b/bin/cron/registrations.php @@ -5,14 +5,13 @@ require 'connect.db.inc.php'; $message = ''; -$res = XDB::iterRow("SELECT al.alias, pd.promo, e.email +$res = XDB::iterRow("SELECT a.hruid, pd.promo, e.email FROM accounts AS a INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms)) INNER JOIN profile_display AS pd ON (ap.pid = pd.pid) - LEFT JOIN aliases AS al ON (a.uid =a.uid AND al.type = 'a_vie') LEFT JOIN emails AS e ON (a.uid = e.uid AND NOT FIND_IN_SET('filter', e.flags)) WHERE a.registration_date > {?} - GROUP BY al.alias + GROUP BY a.hruid ORDER BY pd.promo", date("Ymd000000", strtotime('last Monday'))); if ($count = $res->total()) { -- 2.1.4