Re: How to Replace the table data

From: Date: Sat, 15 Sep 2001 07:46:13 +0000
Subject: Re: How to Replace the table data
Groups: php.db 
Request: Send a blank email to php-db+get-12471@lists.php.net to get a copy of this message
cool ! that's what i wanted to say :) thank jason wong ! u da best --- "Jason Wong" <phplist@gremlins.com.hk> > wrote: >> no it's working (successed), but nothing was updated. >> I tried to make a fake table. > >> when i tried to make a fake table its working. >> i tried to change "ABC" from the table to "XXX" >> but if i got data called ABCD , it didnt change to XXXD > >> why ? > >*Now* I know what you're trying to do. The UPDATE query given previously: > >UPDATE table set field='XXX' WHERE field='YYY' > >competely replaces the *whole* field. > >What you want is something that replaces *part* of the field. Off hand I >can't think of a way to use a single SQL query to do what you want. You may >want to look at the string functions of MySql to see whether they will help: > >http://www.mysql.com/doc/S/t/String_functions.html > > > >regards >-- >Jason Wong >Gremlins Associates >www.gremlins.com.hk >Tel: +852-2573-5033 >Fax: +852-2573-5851 _____________________________________________________________ www.kaskus.com - FREE EMAIL SERVICE

« previous php.db (#12471) next »