Mysql unsubscribe users from only one list

Hi all,
I wonder how to unsubscribe user from only one list, the sql way.
Maybe there is an other an easier way to do it, please let me know.

I tried :

delete from phplist_listuser lu 
inner join phplist_user_user uu on
where lu.listid=XXX
and lu.userid in
    select id from phplist_user_user uu
    where in 
... emails ...
    as tmpTable
order by;

but this request does not unsubscribe the users.
Thanks by advance


1 Like

@bvphp Instead of using sql you can use the Subscribers plugin


that seems to be exactly what I need but, I tried to install your plugin, and am now facing an other problem about plugins install … arf
Anyway thanks, I’ll tell you back

@bvphp You can use this sql to do the job

FROM phplist_listuser lu
JOIN phplist_user_user u ON = lu.userid
WHERE IN('', '')
AND lu.listid = 99
1 Like

Thank you for all duncanc,
I finally installed your plugin and it works !
It is really a useful feature.