Re: How to Replace the table data

From: Date: Sat, 15 Sep 2001 06:12:34 +0000
Subject: Re: How to Replace the table data
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12469@lists.php.net to get a copy of this message
> 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

« previous php.db (#12469) next »