[EMAIL PROTECTED] writes:
> an apostrophe
> 
> >Description: If I try to INSERT data containing an apostrophe into a
> Field defined as mediumtext it works ok. However, if I try to insert the
> same data into a Field defined as varchar, the INSERT fails. And, it not 
> only doesn't work...it does nothing at all...no error message of any kind.
>       
> >How-To-Repeat:  mysql_query("INSERT INTO reply (subj,message)
>                             VALUES('$subj','$message')");
>                  where subj is defined as varchar(50) and
>                        message is defined as mediumtext
> Set the value of subj to "You're Great" and message to anything.
> 
> >Fix:  Either change the Field type to mediumtext (blob) or do a
> value=addslashes(value) before the INSERT.
> 

Please read our manual on escaping your strings.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com


---------------------------------------------------------------------
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

Reply via email to