RE: [PHP] Can you find the parse error?
| From: | Kevin Stone | Date: | Fri, 29 Mar 2002 22:56:54 +0000 |
| Subject: | RE: [PHP] Can you find the parse error? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90730@lists.php.net to get a copy of this message | ||
I have found it safer to use backticks on all of my table and field
names. I doubt that's the problem but it's a good practice and
something to try anyway.
INSERT INTO
tblUserInfo (UserID, Complex,
Contact,.. etc..
By the way what are those complicated looking '".$var."' for? You
should only have to do '$var'
If all else fails run the query string through phpMyAdmin if you have it
installed. That usually helps me pin down the problem.
-Kevin
-----Original Message-----
From: Eric Kilgore [mailto:eric@faaces.org]
Sent: Friday, March 29, 2002 2:46 PM
To: php-general (E-mail)
Subject: [PHP] Can you find the parse error?
What's wrong with this code that it would give this error?
Parse error: parse error, expecting ','' or ';''
$query = "INSERT INTO tblUserInfo (UserID, Complex, Contact, Address,
State,
City, Zip, Phone,
Fax, email, fee) VALUES ('".$UserID."', '".$Complex."',
'".$Contact."',
'".$Address."',
'".$State."', '".$City."',
'".$Zip."', '".$Phone."',
'".$Fax."',
'".$email."', '".$fee."')";
I think I've been staring at it too long. I can't find it.
Eric
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php