Fixes query in registrations.php
authorStéphane Jacob <sj@m4x.org>
Tue, 13 Jul 2010 09:17:17 +0000 (11:17 +0200)
committerStéphane Jacob <sj@m4x.org>
Tue, 13 Jul 2010 09:17:17 +0000 (11:17 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
bin/cron/registrations.php

index 1caa440..3b997a1 100755 (executable)
@@ -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",