From: Stéphane Jacob Date: Mon, 19 Jul 2010 07:42:59 +0000 (+0200) Subject: Fixes weekly registration email sql query. X-Git-Tag: xorg/1.0.1~15^2~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=336820bacc838c99ed215c4901c9b50cad903bb1;p=platal.git Fixes weekly registration email sql query. Signed-off-by: Stéphane Jacob --- 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()) {