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.
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
Try this:
date in the query above is a column name. You can read more about MySQL time and date functions here.Code:SELECT ID, date, name FROM users WHERE date > CURDATE()-10;
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
ankush (03-25-2013)
Bookmarks