MyBB Community Forums

Full Version: mysql query to show anyone who hasn't logged in since X date.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm hoping someone can provide me with an sql query to show all the users that haven't been logged in since X date (7/1/2011 for example). if there are people that are shown when the query is ran, I'm wondering if it's possible to print (onto notepad or export it) that list?

thanks!
Get a timestamp of the X time. ( http://www.unixtimestamp.com/index.php )
SELECT * FROM `mybb_users` WHERE lastvisit < 'timestamp'
(2011-10-03, 02:50 AM)PJGIH Wrote: [ -> ]Get a timestamp of the X time. ( http://www.unixtimestamp.com/index.php )
SELECT * FROM `mybb_users` WHERE lastvisit < 'timestamp'

thanks man.