Delete users that are using ICQ

Status
Not open for further replies.
11 comments
ok try these 2 queries. If you have a prefix it will have to be added to the front of user.

PHP:
select * from user where posts = 0
PHP:
select * from user where icq != ''

If that gives you the results you want then you can use these queries to delete them.
PHP:
delete from user where posts = 0
PHP:
delete from user where icq != ''

Remember to always backup your user table before performing any sql commands.

Also doing it this way the posts and topics for those with an icq being deleted will look funny.
 
No that command says delete from user which means any user that has an ICQ address in that field will get deleted. Not the icq field.

Did you run the select first like I said to see what results would happen?
 
No that command says delete from user which means any user that has an ICQ address in that field will get deleted. Not the icq field.
Code:
"[COLOR=#000000][COLOR=#0000bb]delete from user where icq [/COLOR][COLOR=#007700]!= [/COLOR][COLOR=#dd0000]''[/COLOR][/COLOR]
Shouldn't that be:
Code:
[COLOR=#000000][COLOR=#0000bb]delete * from user where icq ![/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]''[/COLOR][/COLOR]
 
Code:
"[COLOR=#000000][COLOR=#0000bb]delete from user where icq [/COLOR][COLOR=#007700]!= [/COLOR][COLOR=#dd0000]''[/COLOR][/COLOR]
Shouldn't that be:
Code:
[COLOR=#000000][COLOR=#0000bb]delete * from user where icq ![/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]''[/COLOR][/COLOR]
Nope. :)
 
Status
Not open for further replies.
Back
Top