Jump to content

Rimuovere preferenze utenti inattivi


BomAle

Recommended Posts

In questa guida vi lascio una serie di consigli per ridurre il carico di lavoro svolto dal software.

RIDURRE followers inattivi con mysql, utile per chi ha un server smtp con limitazioni.

#TROVARLI
SELECT m.last_visit,f.follow_app,f.follow_area,f.follow_rel_id, count(*) as counter
FROM ipb_core_follow f
LEFT JOIN ipb_core_members m ON f.follow_member_id=m.member_id
WHERE m.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 1 YEAR) 
GROUP BY f.follow_app, f.follow_area, f.follow_rel_id
ORDER BY counter desc

#RIMUOVERLI
DELETE f.* FROM ipb_core_follow f
LEFT JOIN ipb_core_members m ON f.follow_member_id=m.member_id
WHERE m.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 1 YEAR) 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.