NYCPHP Meetup

NYPHP.org

[nycphp-talk] Global SQL Update Query Needed

Peter Sawczynec ps at pswebcode.com
Wed Jul 6 17:50:14 EDT 2005


Fine. So very fine. Gracias, Pedro



-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Dan Cech
Sent: Wednesday, July 06, 2005 4:11 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Global SQL Update Query Needed


http://dev.mysql.com/doc/mysql/en/string-functions.html

UPDATE mytable SET keywords = REPLACE(keywords,'moon','lunar');

Dan

Peter Sawczynec wrote:
> I need a SQL query for MySQL 4.1.
> 
> The table has over 20,000 rows. Each row has a "keywords" field. The 
> keywords field has either zero words, one word or a series of colon 
> (:) delimited words.
> 
> Need to swap all occurrences of the keyword "moon" with new keyword 
> "lunar". What SQL query might do that.
> 
> Warmest regards,
> 
> Peter Sawczynec
> Technology Director
> PSWebcode
> ps at pswebcode.com
> 718.543.3240
> 
> 
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP 
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org

_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org





More information about the talk mailing list