Hello,
I can't seem to figure out how to remove all of the instances of a characters from every row.
For the example below I want to remove all of the $ characters from all rows.
Example row:
Row 1: The War of Rose$
Row 2: Mi$$i$$ippi
Row 3: Cowboy$
I've tried DELETE FROM table WHERE title=$, UPDATE table SET title='' WHERE title='$'. And none of them worked.
Thanks for your help.
3 Replies - 459 Views - Last Post: 28 June 2009 - 09:15 PM
#1
How to delete all instances of a characters from all rows
Posted 28 June 2009 - 04:08 AM
Replies To: How to delete all instances of a characters from all rows
#2
Re: How to delete all instances of a characters from all rows
Posted 28 June 2009 - 04:20 AM
Science i Know you can't do it with a query but you can do it with PHP.
str_replace
str_replace
$value = 'Mi$$i$$ippi';
$value1 = str_replace("$","",$value);
echo $value1;
This post has been edited by noorahmad: 28 June 2009 - 09:15 PM
#3
Re: How to delete all instances of a characters from all rows
Posted 28 June 2009 - 02:28 PM
For quick reference, if you put Mi$$i$$ippi in single quotes instead of double quotes when you declare the value, you won't have to escape the dollar signs.
This post has been edited by Valek: 28 June 2009 - 02:29 PM
#4
Re: How to delete all instances of a characters from all rows
Posted 28 June 2009 - 09:15 PM
Thank You.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|