Reply to Re: Change a single word in a column with wildcards?

Your name:

Reply:


Posted by Bonge Boo! on 09/28/47 11:24

On 18/8/05 10:29, in article BF2A1370.A7C27%bingbong@spamcop.net, "Bonge
Boo!" <bingbong@spamcop.net> wrote:

> This is probably really obvious, but I can't find a quick answer.
>
> I want to be able to do a "search and replace" style spelling correction on
> a column because I have spelt a word incorrectly. However I don't know the
> correct syntax for the SET command. If I use SET colname = %goodword% I
> simply replace the entire column with %goodword%
>
>
> UPDATE tbl_products SET product_name = "%goodword%" WHERE product_name LIKE
> "%badword%"
>
> Anyone help my poor brain out?

Ok. Sussed it out.

UPDATE tbl_products SET product_name = REPLACE(product_name, 'badword',
'goodword');

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация