1 INSERT INTO profile_directory (uid
, email_directory
)
2 SELECT user_id
, Mel_usage
3 FROM fusionax_anciens
AS ax
4 INNER JOIN auth_user_md5
AS u
ON (ax.id_ancien
= u.matricule_ax
)
5 WHERE Mel_publiable
!= '0' AND Mel_usage
!= '';
7 INSERT IGNORE INTO register_marketing (uid
, email
, type)
8 SELECT user_id
, Mel_usage
, 'ax'
9 FROM fusionax_anciens
AS ax
10 INNER JOIN auth_user_md5
AS u
ON (ax.id_ancien
= u.matricule_ax
)
11 LEFT JOIN emails
AS e
ON (e.uid
= u.user_id
AND e.flags
= 'active')
12 WHERE Mel_usage
!= '' AND
13 Mel_usage
NOT LIKE '%@polytechnique.edu' AND
14 Mel_usage
NOT LIKE '%@polytechnique.org' AND
15 Mel_usage
NOT LIKE '%@m4x.org' AND
16 Mel_usage
NOT LIKE '%@melix.%' AND
19 -- vim:set syntax=mysql: