Results 1 to 2 of 2

Thread: find inactive users

  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default find inactive users

    I am storing last login time of user in users table, I want to get all the users inactive from 10 days anyone help with the query.
    Last edited by ankush; 03-25-2013 at 06:27 PM. Reason: re solved

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,730
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default

    Try this:

    Code:
    SELECT ID, date, name FROM users WHERE date > CURDATE()-10;
    date in the query above is a column name. You can read more about MySQL time and date functions here.
    Last edited by james438; 03-24-2013 at 10:54 PM. Reason: reworded for clarification.
    To choose the lesser of two evils is still to choose evil. My personal site

  3. The Following User Says Thank You to james438 For This Useful Post:

    ankush (03-25-2013)

Similar Threads

  1. Replies: 7
    Last Post: 12-11-2010, 05:16 PM
  2. Replies: 6
    Last Post: 04-06-2010, 10:12 PM
  3. inactive links in FF 2
    By rebelbwb in forum HTML
    Replies: 5
    Last Post: 05-20-2009, 01:21 AM
  4. Replies: 4
    Last Post: 03-02-2006, 01:13 AM
  5. tabbed content: inactive tabs
    By snooper in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-01-2006, 10:03 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •