[thelist] SQL question

Joshua Olson joshua at waetech.com
Tue Oct 5 12:41:54 CDT 2004


> -----Original Message-----
> From: Tom Dell'Aringa
> Sent: Tuesday, October 05, 2004 1:31 PM
> 
> During a transfer to wordpress my comments all got borked with 
> the wrong name/e-mail. I want to go
> directly into the DB to fix this. 
> 
> I have the table 'comments' with the fields author and author_email.
> 
> What I want to do is REPLACE all occurances of 'TSF' in author 
> with 'anonymous' 
> 
> and then
> 
> Replace all occurrances of my email with a blank or null. 

Tom,

Which DB are you using?

Typically it'll look something like:

UPDATE comments
SET author = 'anonymous'
  , author_email = NULL
WHERE author = 'TSF'

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 




More information about the thelist mailing list