-1

Hi, ok I have about 1600 records in a mySQL db. Many of them have a forward slash "/" in the itemName column. In my site, I am passing the itemName as a URL variable on many search forms, so obviously the forward slash is not a good naming convention to use.

IS there a way to go in my db and find and replace all instances on the forward slash? I usually use navicat for db management, and it has a find feature, but you have to replace each forward slash it finds by hand. Thanks for any suggestions in advance!

3
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by BASHA`
0

For a table named 'items':

update items set itemName = replace(itemName,'/','');
0

Awesome! This will only replace the "/" in the column I specify correct? What I mean is there are forward slashes in other columns, but since they are not used in variables I might pass in a url, I want to leave them. Thanks!

0

Yes, it replaces only the specified string in the specified column. Forward slashes in other columns won't change.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.