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
Your exact form would be something like this (do this in your CODE from now
on, this is 2 one time queries to run to fix it historicly)
UPDATE table SET field = REPLACE(field,'>','');
UPDATE table SET field = REPLACE(field,'<','');
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 10:45 AM
Subject: Removing Bad Characters from Database
> 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.
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php