TBDragon
Active member
hi i have many users that have invalid email address
and i want to banned them
but its hard for me to search for email one by one
so i was thinking of making a query to get the user_id by searching for the email
like
then
but how i can make a php code to read the whole emails in the txt file i have then read them one by one
sorry =( i didnt work with files in php =(
and is my query is ok or there is another way to do that ?
and i want to banned them
but its hard for me to search for email one by one
so i was thinking of making a query to get the user_id by searching for the email
like
Code:
select user_id from xf_user where email like '%email@email.com%'
Code:
UPDATE `xf_user` SET `user_group_id` = '6',
`is_banned` = '1' WHERE `xf_user`.`user_id` =x; // where x the id i got from last query
but how i can make a php code to read the whole emails in the txt file i have then read them one by one
sorry =( i didnt work with files in php =(
and is my query is ok or there is another way to do that ?