Hi friends

Thanks for your repaly for all my question..
I need one update query. I have selected the datas are insert with coma ",".

Query
SELECT city
FROM `locations`
WHERE city REGEXP ','

I got the result..
Silver Spring,
Elkins,
PORTLAND,
Baltimore,

I need like this
Silver Spring
Elkins
PORTLAND
Baltimore

I need to remove the "," and restore the values .
Thanks
Vssp

That's really more of an SQL thing. You may want to try posting there if you don't find your answer here.

It can be done in PHP, probably not as fast, though.
Run your query, parse the result set (Take a look at http://us2.php.net/manual/en/function.stripos.php) and write the update query.

Hi thanks for your replay
This is the update query

UPDATE `locations` SET city = replace( city, ',', '' ) WHERE city LIKE '%,'

I just share with u


I THINK YIU CAN USE str_replace