Re: Removing Bad Characters from Database

2001-05-09 Thread Paul DuBois
At 1:45 PM -0400 5/9/01, <[EMAIL PROTECTED]> wrote: >I was wondering if anyone knows of a way i can strip bad characters out >of a mysql database field namely the < > charators. These charactors are >causing havok for >me when I try and post data to the web. Thanks Alot. Why not just encode your

RE: Removing Bad Characters from Database

2001-05-09 Thread joe
Thanks alot I truely appreciated the help in this matter. both you guys are life savers :^) -Original Message- From: A. Chris Nichols [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 2:08 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Removing Bad Characters from

Re: Removing Bad Characters from Database

2001-05-09 Thread A. Chris Nichols
You can also condense this into one statement if you nest the replace statements: UPDATE table_name SET field_name1=replace(replace(field_name1, '>', ''), '<', '') etc. -Chris At 01:49 PM 5/9/2001, Eric Fitzgerald wrote: >http://www.mysql.com/doc/S/t/String_functions.html > >REPLACE(str,from_s

Re: Removing Bad Characters from Database

2001-05-09 Thread Eric Fitzgerald
http://www.mysql.com/doc/S/t/String_functions.html REPLACE(str,from_str,to_str) Returns the string str with all all occurrences of the string from_str replaced by the string to_str: mysql> select REPLACE('www.mysql.com', 'w', 'Ww'); -> 'WwWwWw.mysql.com' This function is multi-byte safe