List Info

Thread: Find/replace in a mysql table




Find/replace in a mysql table
country flaguser name
United States
2007-03-12 04:02:43
Hi,


is it possible with sql do a find / raplce in a mysql table
?
I would like to replace a field in a column for all his
occurrencies.

Thanks a lot
GP


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Find/replace in a mysql table
country flaguser name
Norway
2007-03-12 04:58:54
Use the WHERE clause.

Ex: UPDATE myTable SET name = 'updated name' WHERE name like
'old name';

Here you search for string 'old name' and replaces it with
the string
'updated name' on every occurrence.

Is this what you where looking for?

-----Original Message-----
From: phpmysqlgooglegroups.com [mailto:phpmysqlgooglegroups.com] On Behalf
Of pontarolowarpstudio.ch
Sent: 12. mars 2007 10:03
To: PHP & MySQL
Subject: Find/replace in a mysql table


Hi,


is it possible with sql do a find / raplce in a mysql table
?
I would like to replace a field in a column for all his
occurrencies.

Thanks a lot
GP




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Find/replace in a mysql table
user name
2007-03-12 21:10:31


On 3/12/07, pontarolowarpstudio.ch">pontarolowarpstudio.ch < pontarolowarpstudio.ch">pontarolowarpstudio.ch > wrote:

Hi,


is it possible with sql do a find / raplce in a mysql table ?
I would like to replace a field in a column for all his occurrencies.

update tablename set columnname='new value' where columnname='old value'

May be that is what you want?

--
http://visit.aryosanjaya.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP & MySQL"; group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )