Jump to content

Active to Inactive (Client Status SQL)


Dedigeeks-Sean

Recommended Posts

Hello,

 

I remember a user on this forum quite a while ago advised on an SQL you could run to turn "Active" clients "Inactive" if they had an inactive "Affiliate, Hosting, & Domain" service.

 

Something like this:

 

Switching where "active" to "inactive" where has no domains (or all cancelled 6+months ago) and has no hosting (or all cancelled 6+months ago) and no telephone calls in 6+months and no support tickets in 6+months

Switching where "inactive" to "active" where domain.status in Active/Pending/Pending Transfer/Expired

Switching where "inactive" to "active" where hosting.status in Active/Pending/Suspended

Switching where "inactive" to "active" where in tblAffiliates

 

Unfortunately this cannot run under SQL anymore for me:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Switching where "active" to "inactive" where has no domains (or all cancelled 6+' at line 1

 

 

Does anyone know any other way to manage this same operation?

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