From: Stéphane Jacob Date: Tue, 13 Jul 2010 09:17:17 +0000 (+0200) Subject: Fixes query in registrations.php X-Git-Tag: xorg/1.0.1~15^2~42 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=36d2dab7af85c9cd8f485488fed69328dbf64598;p=platal.git Fixes query in registrations.php Signed-off-by: Stéphane Jacob --- diff --git a/bin/cron/registrations.php b/bin/cron/registrations.php index 1caa440..3b997a1 100755 --- a/bin/cron/registrations.php +++ b/bin/cron/registrations.php @@ -5,12 +5,12 @@ require 'connect.db.inc.php'; $message = ''; -$res = XDB::iterRow("SELECT al.alias, pd.promo, e.email //a.alias, u.promo, email +$res = XDB::iterRow("SELECT al.alias, pd.promo, e.email FROM accounts AS a - INNER JOIN account_profile 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)) + 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 ORDER BY pd.promo",