Jump to content


Photo
- - - - -

SQL action code


  • Please log in to reply
9 replies to this topic

#1 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 19 June 2012 - 01:27 PM

What is the sql code to delete any member from the member group who has not visited my board in the last 12 months?
Regards, Martin

#2 Michael

Michael

    Administrator

  • Management
  • 3,456 posts
  • Location:Columbus, OH
  • IP.Board Version:3.4
Contributor

Posted 19 June 2012 - 02:22 PM

You should never delete members by running SQL queries. In the Members tab of the Admin CP, you can use the advanced search to find and remove these members. You'll want to do it that way, as that's the only clean way to delete members.
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter · Google+
Follow Invision Focus: On Facebook · On Twitter

#3 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 20 June 2012 - 04:37 AM

The search results don't show the 'last visited date' which I need to see to make sure that the right data has been extrapolated thus enabling me to delete those members who haven't visited in the last year.
Regards, Martin

#4 Michael

Michael

    Administrator

  • Management
  • 3,456 posts
  • Location:Columbus, OH
  • IP.Board Version:3.4
Contributor

Posted 20 June 2012 - 06:26 AM

Yes, it does:

Posted Image
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter · Google+
Follow Invision Focus: On Facebook · On Twitter

#5 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 20 June 2012 - 06:55 AM

I know it shows it in the search parameters BUT it does not show it in the results!
Regards, Martin

#6 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 20 June 2012 - 06:59 AM

Oops, I forgot the images.

Attached File  capture1.jpg   53.96K   7 downloads

Attached File  capture2.jpg   8.9K   6 downloads
Regards, Martin

#7 Michael

Michael

    Administrator

  • Management
  • 3,456 posts
  • Location:Columbus, OH
  • IP.Board Version:3.4
Contributor

Posted 20 June 2012 - 08:16 AM

Why do you need it in the search results? Aren't you just deleting anyone who fits the criteria you want? The results will be what you searched for.
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter · Google+
Follow Invision Focus: On Facebook · On Twitter

#8 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 20 June 2012 - 08:45 AM

Yes that's true; but I would have liked to have seen that parameter displayed in the results; its a sort of confirmation really. Is it something I can add in a file edit and can you tell me what it is and where to insert it? In any event, thank you very much for your help Michael.
Regards, Martin

#9 mmmarriott

mmmarriott

    Newbie

  • Members
  • Pip
  • 6 posts
  • Location:Birkenhead, Cheshire, England, UK
  • IP.Board Version:3.2

Posted 20 June 2012 - 05:10 PM

Hold on!!

'Last visited between' is the wrong parameter. I need to know the opposite. I need to know those members who have not visited in the last year. The search facility does not offer what I need.
Regards, Martin

#10 Michael

Michael

    Administrator

  • Management
  • 3,456 posts
  • Location:Columbus, OH
  • IP.Board Version:3.4
Contributor

Posted 21 June 2012 - 06:45 AM

Yes, it does, use the board start date or something even earlier for the first box, and use the date one year ago in the second box.
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter · Google+
Follow Invision Focus: On Facebook · On Twitter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users