Ceci est une ancienne révision du document !
Table des matières
Recherche dans la base
Recherche des utilisateurs étant en erreur
mysql> select user_subscriber,list_subscriber,bounce_subscriber from subscriber_table where bounce_subscriber != 'NULL';
Pour les listes d'une école : (direction.ecole, scolarite.ecole, ….)
mysql> select user_subscriber,list_subscriber from subscriber_table
where bounce_subscriber != 'NULL' and list_subscriber like "%ecole" ;
Supprimer les erreurs
mysql> update subscriber_table set bounce_subscriber = 'NULL' and bounce_score_subscriber = 'NULL'
where bounce_subscriber != 'NULL' and list_subscriber = 'xxxx' ;
Recherche des abonnés en nomail
mysql> select user_subscriber, list_subscriber from subscriber_table where reception_subscriber ='nomail' ;
Mettre un abonné en nomail pour toutes ses listes
mysql> update subscriber_table SET reception_subscriber ='nomail' WHERE user_subscriber like '%jean.dupont%';
ou
mysql> update subscriber_table SET reception_subscriber ='nomail' WHERE user_subscriber ='jean.dupont@grenoble-inp.fr';
Recherche des listes auxquelles appartient un abonné
mysql> select user_subscriber, list_subscriber from subscriber_table where user_subscriber like 'jean.dupont%';
Recherche des abonnés d'une liste
mysql> select user_subscriber, list_subscriber from subscriber_table where list_subscriber='liste';
Suppression de tous les abonnés d'une liste
mysql> delete from subscriber_table where list_subscriber='liste';
Recherche des listes avec le même propriétaire
mysql> select list_admin from admin_table where role_admin='owner' and user_admin='toto@grenoble-inp.fr';
Recherche des listes avec le même modérateur
mysql> select list_admin from admin_table where role_admin='editor' and user_admin='toto@grenoble-inp.fr';
Recherche des abonnés des listes avec le même propriétaire
mysql> select subscriber_table.list_subscriber, user_subscriber from subscriber_table
left join admin_table on admin_table.list_admin=subscriber_table.list_subscriber
where admin_table.role_admin='owner' and admin_table.user_admin='toto@grenoble-inp.fr';
Recherche des propriétaires de liste avec abonnés provenant de source extérieur
mysql> SELECT user_admin, list_admin from admin_table
where role_admin='owner' and list_admin in
(select list_subscriber from subscriber_table where included_subscriber='1');
Suppression d'une exclusion
mysql> delete from exclusion_table where list_exclusion='test-exclus' and user_exclusion='toto@grenoble-inp.fr' ;
