How to Delete inactive users from database?

Discussion in 'Joomla' started by Beefandy, Nov 22, 2011.

  1. #1
    Hi, I want to remove all inactive spam users from mysql

    I looked up on the internet and it said to use this command:

    delete from jos_users where lastvisitDate=’0000-00-00 00:00:00′


    but i get this error:


    #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 '00:00:00′' at line 1

    Any ideas?
     
    Beefandy, Nov 22, 2011 IP
  2. MsNN

    MsNN Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    3
    Trophy Points:
    0
    #2
    Why not just delete inside Joomla? Sort by "last logged in", choose your date cut off, and delete the rest.
     
    MsNN, Nov 22, 2011 IP
  3. gizmo222

    gizmo222 Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good answer :)

    ...or use delete from jos_users where lastvisitDate < ’2010-00-00 00:00:00′;
    (to delete where Date is in the past of 2010)
     
    gizmo222, Nov 28, 2011 IP