Jump to content
BomAle

Rimuovere preferenze utenti inattivi

Recommended Posts

BomAle

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) 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.