Re: Can you find the parse error?
| From: | Miguel Cruz | Date: | Fri, 29 Mar 2002 22:07:58 +0000 |
| Subject: | Re: Can you find the parse error? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90727@lists.php.net to get a copy of this message | ||
On Fri, 29 Mar 2002, Eric Kilgore wrote:
> 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.
I don't see an error, but wouldn't it be easier (and faster) to write:
$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')";
without all the concatenation?
miguel