RE: [PHP] INSERTING text with whitespace

From: Date: Wed, 19 Jul 2000 08:48:24 +0000
Subject: RE: [PHP] INSERTING text with whitespace
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7235@lists.php.net to get a copy of this message
Daniel this is what I use to insert records into a MySQL database: $db->query("INSERT INTO Table SET Column = \"$message_variable\""); hth - Jason Wong Digital View Ltd 2201 Nanyang Plaza 57 Hung To Road Kwun Tong HONG KONG Tel: +852-2861-3615 Fax: +852-2520-2987 www.digitalview.com > -----Original Message----- > From: Daniel Dean [mailto:daniel@jayleal.com] > Sent: 18 July 2000 01:55 > To: php-general@lists.php.net > Subject: [PHP] INSERTING text with whitespace > > > I've been trying to insert a message to a field in my MySQL database. > However, only the first word of the message gets inserted. > > $query = "INSERT INTO table_name ('$message_variable')"; > mysql_db_query("database", $query); > > I've tried not only the above code, but also with various other methods of > escaping sequences. I've used urlencode and addslashes on > $message_variable, but nothing seems to allow the entire message into the > field. What am I missing? > > Dan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#7235) next »