You are here: Re: mySql - find and replace. « PHP SQL « IT news, forums, messages
Re: mySql - find and replace.

Posted by Richard on 08/21/07 12:27

OK Corrected the syntax - see below

"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:op.txeskv0rqnv3q9@metallium...
On Tue, 21 Aug 2007 14:00:32 +0200, Richard <sales@justmedals.com> wrote:

>
> I have tried:
> UPDATE [LISTINGS] SET [MEDAL_NAME] = replace( [MEDAL_NAME], '[War
> Plaque]',
> '[Memorial Plaque]' )
>
> MySQL said:
>
> #1064 - You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> '[LISTINGS] set [MEDAL_NAME] = replace([MEDAL_NAME],'[War
> Plaque]','[Memorial Pla' at line 1
>
> ????????

I assume the blockquotes aren't there...

UPDATE `LISTINGS` SET `MEDAL_NAME` = REPLACE(`MEDAL_NAME`, 'War
Plaque','Memorial Plaque')

(Are you sure the tablename & fielname are all in capitals? Default would
be lowercase AFAIK).
--
Rik Wasmus

Should Be:

UPDATE `LISTINGS` SET `MEDAL_NAME` = REPLACE(`MEDAL_NAME`, "War
Plaque","Memorial Plaque")

Changed to double commas and it carried out the order!! Thanks all

 

Navigation:

[Reply to this 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

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