Jump to content

How to close customer accounts of cetain product?


raamee

Recommended Posts

The script does not exist. It's in my mind :) anyway this is the query

UPDATE tblclients t1 LEFT JOIN tblhosting t2 ON t1.id = t2.userid SET status = '[b]Closed[/b]' WHERE t2.packageid = '[b]8[/b]' AND t2.domainstatus = '[b]Active[/b]'

With this i close all clients with package id (aka product id) equal to 8 only if their service is Active. So let's say that you want to close all clients with "My super hosting" package (id = 10). Change 8 to 10 and run this query with a scheduled task (cron job). That's it.

Edited by Kian
Link to comment
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.

  • Recently Browsing   0 members

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

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated