kevinkhan Posted March 31, 2010 Share Posted March 31, 2010 I have two tables in my database one called Category and the other called CategoryParent Is there anyway of replacing all the words in the table columns with another word.. We say from London to Mancester? Does anybody know? Quote Link to comment https://forums.phpfreaks.com/topic/197096-mysql-query-needed/ Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 Your question is about as clear as mud. UPDATE tbl SET fld = 'Mancester' WHERE fld = 'London'; Quote Link to comment https://forums.phpfreaks.com/topic/197096-mysql-query-needed/#findComment-1034590 Share on other sites More sharing options...
kevinkhan Posted March 31, 2010 Author Share Posted March 31, 2010 Your question is about as clear as mud. UPDATE tbl SET fld = 'Mancester' WHERE fld = 'London'; Thanks but the fields contatins paragraphs like Flats and Apartments in Dublin and another field Dating in Dublin and i want it to become Flats and Apartments in Limerick and Dating in Limerick Is this possible?? Quote Link to comment https://forums.phpfreaks.com/topic/197096-mysql-query-needed/#findComment-1034594 Share on other sites More sharing options...
trq Posted March 31, 2010 Share Posted March 31, 2010 Of course its possible. UPDATE tbl SET fld = REPLACE(fld, 'Dublin', 'Limerick'); Quote Link to comment https://forums.phpfreaks.com/topic/197096-mysql-query-needed/#findComment-1034597 Share on other sites More sharing options...
kevinkhan Posted March 31, 2010 Author Share Posted March 31, 2010 Of course its possible. UPDATE tbl SET fld = REPLACE(fld, 'Dublin', 'Limerick'); Wow. thats cool man.. thanks Quote Link to comment https://forums.phpfreaks.com/topic/197096-mysql-query-needed/#findComment-1034600 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.