oks i had someone else figure this for me
the query was
PHP Code:
update user left join (select userid from subscriptionlog where expirydate > unix_timestamp()) sl using (userid) set usergroupid = 2 where usergroupid = 32 and sl.userid is null
however i have a little mess left behind such as usertitles didnt change back, but i sorted this with
PHP Code:
UPDATE `user` SET `usertitle` = 'Stowaway' WHERE `usergroupid` = 34
and so on for all those that were not right
however the problem i now have is that the users colour hasnt changed for some of them and the only way i have found to make it change is by manually altering their usergroup in the board software one by one.
I have tried rebuilding the user ranks and titles etc, but does anyone have any ideas how i can get them to display the correct colours again on the usersonline page and within their posts?
many thanks for anyone who can help