"Steve Fitzgerald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I keep getting the following SQL error:
>
The last fieldname is CompanyID not ContactID.

You have an error in your SQL syntax near ')' at line 14
>
> Line 14 is: '$FirstName', so the error must correspond to a different part
> of the code.
>
> Any ideas?
>
> $add_contact_sql = "INSERT INTO $table_name
> (ContactID, FirstName, LastName, Title, WorkPhone,
> HomePhone,Mobile,EmailName,Birthday,CompanyID)
> VALUES
> ('',
> '$FirstName',
> '$LastName',
> '$Title',
> '$WorkPhone',
> '$HomePhone',
> '$Mobile',
> '$EmailName',
> '$Birthday',
> '$CompanyID',     //this is actually CompanyID not ContactD
> )";
>
> $result = @mysql_query($add_contact_sql, $connection) or die
> (mysql_error());
> ?>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to