PDA

View Full Version : Need help with an SQL Query


SnapOff Racing
01-12-2011, 06:29 AM
I am trying to delete all the signatures of every member that is in the banned user group. I have created a select statement that does what I want but now I just need some help creating an UPDATE or DELETE statement.

select signature
from usertextfield
join user
on user.userid = usertextfield.userid
where user.usergroupid = 8


Thanks in Advance! :up:

SnapOff Racing
01-13-2011, 08:52 AM
bump^^

kh99
01-13-2011, 09:07 AM
I haven't tried this, but I think it would be:

update usertextfield
join user
on user.userid = usertextfield.userid
set signature=''
where user.usergroupid = 8

ETA: I did a quick test on a junk db and it seems to work.

SnapOff Racing
01-13-2011, 11:18 AM
Twice in two days! Damn I need to put you on the payroll! :D

Thanks for your help AGAIN I really appreciate it! :up:

borbole
01-13-2011, 12:03 PM
I have coded a mod that does that if you don''t want to do it manually.

https://vborg.vbsupport.ru/showthread.php?t=249634