----- Original Message -----
From: "Hugh Bothwell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 6:23 AM
Subject: [PHP-DB] Re: Spaces Problem php & mysql
> > I've been pounding my head (and the keyboard with searches) over this. Do
> I
> > have to take the first entry apart with string functions to get my desired
> > end, which is the entire name in one field in the database?
>
> ... make sure the value is enclosed in quotes when you try
> to insert it into the database, ie
>
> INSERT INTO table ( name ) VALUES ( '$name' )
Make sure you escape out all single quotes in $name.
$name = " This is Paul's field."
.
.
.
INSERT INTO table ( name ) VALUES ( '$name' )
Will fail, because you have VALUES ('This is Paul');
Post the full value of $name via var_dump($name) and
var_dump($query) and we'll see what we can find with it.
'Luck
-Szii
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php