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.
>Submitter-Id: <submitter ID>
>Originator:
>Organization:
>MySQL support: [none]
>Synopsis: <mysql_query INSERT fails>
>Severity:
>Priority:
>Category: mysql
>Class:
>Release: mysql-3.22.24 (Red Hat rpm distribution)
>Environment:
System: Linux www.tsparks.com 2.2.10 #5 Tue Dec 5 17:54:01 PST 2000 i586 unknown
Architecture: i586
Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='egcs' CFLAGS='-O6 -fomit-frame-pointer -mpentium' CXX='egcs'
CXXFLAGS='-O6 -fomit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti -mpentium' LDFLAGS=''
Configure command: ./configure --enable-shared --enable-assembler --disable-shared
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
--with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include
--mandir=/usr/man
Perl: This is perl, version 5.005_03 built for i386-linux
---------------------------------------------------------------------
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