Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 27 Oct 2015, 07:31
Lester Wilson Lester Wilson is offline
Join Date: Mar 2002
Help with Query to move users

Hello, I'm looking for some help with a query.

I have a number of user accounts that I would like to move to a new user group. The accounts belong to users that have registered, but have never revisited the forum.

I'd like to move all users with ZERO posts whos REGISTRED Date and LAST VISIT Date are on the same day where registration took place more than 60 days ago.

Could someone suggest a query that will achieve this?

Thank you.

--------------- Added 27 Oct 2015 at 07:42 ---------------

Just after posting i came up with this. Seems to work for me........Maybe useful to others?

Move users to another user group who’s last activity and join date are within 24 hours and have no posts.

SET usergroupid= <--- user group id goes here
WHERE lastactivity - joindate < 86400 < --- 24 hrs
and posts = 0; <--- they never posted

Last edited by Lester Wilson; 27 Oct 2015 at 09:40.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 11:00.

Layout Options | Width: Wide Color: