Anthony2oo4
11-25-2006, 01:49 PM
Hey there,
First of all can anyone confirm that this timestamp is for 6 months ago?
1148533200
I used this site for it:
http://www.plus2net.com/php_tutorial/php_time_stamp.php
If its not can someone show me how to use the mktime function to get a timestamp for 6 months ago.
Anyway my main problem is this. I have run a query on a databse of users as follows.
SELECT * FROM `cms_users` WHERE `user_lastvisit` < 1148533200
This should give me a list of all members who havnt visited us in the past 6 months. Now I want to suspend these users, and the query for this is:
UPDATE cms_users SET user_allow_pm=1, user_allowavatar=1, user_rank=21, susdel_reason='Non active member.', user_level=0, susdel_reason='Non active member.' WHERE user_id=9
(Dont know why susdel_reason is set twice, but i got the query off the CMS script itself)
How can I make a loop that will suspend each user with that query?
thanks for your time and help.
First of all can anyone confirm that this timestamp is for 6 months ago?
1148533200
I used this site for it:
http://www.plus2net.com/php_tutorial/php_time_stamp.php
If its not can someone show me how to use the mktime function to get a timestamp for 6 months ago.
Anyway my main problem is this. I have run a query on a databse of users as follows.
SELECT * FROM `cms_users` WHERE `user_lastvisit` < 1148533200
This should give me a list of all members who havnt visited us in the past 6 months. Now I want to suspend these users, and the query for this is:
UPDATE cms_users SET user_allow_pm=1, user_allowavatar=1, user_rank=21, susdel_reason='Non active member.', user_level=0, susdel_reason='Non active member.' WHERE user_id=9
(Dont know why susdel_reason is set twice, but i got the query off the CMS script itself)
How can I make a loop that will suspend each user with that query?
thanks for your time and help.