RE: [PHP] Inserting with whitespace (D'OH!)
| From: | John Coggeshall | Date: | Mon, 17 Jul 2000 10:27:34 +0000 |
| Subject: | RE: [PHP] Inserting with whitespace (D'OH!) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6983@lists.php.net to get a copy of this message | ||
Suggestions (not sure, but I remember something about this)...
1) Maybe use double quotes instead of single quotes for $message_variable
(i.e. \"$message_variable\")
if all else fails, you could urlencode() or otherwise encode the message to
remove the whitespace and then store
Jophn
-----Original Message-----
From: Daniel Dean [mailto:daniel@jayleal.com]
Sent: Monday, July 17, 2000 6:19 PM
To: php-general@lists.php.net
Subject: [PHP] Inserting with whitespace (D'OH!)
Oops, I forgot to add "VALUES" in the message. Here is the actual code...
$query = "INSERT INTO table_name VALUES('$message_variable')";
mysql_db_query("database", $query);
Is there some formatting restriction or a setting that would cause this to
just store the first string of non-whitespace text out of $message_variable?
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