Re: [PHP-DB] SQL Error

2001-08-02 Thread Martin Lefebvre

Have you tried with NULL instead of '' the ContactID?


On Thu, 2 Aug 2001, Steve Fitzgerald wrote:

> I keep getting the following SQL error:
>
> 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',
> '$ContactID',
> )";
>
> $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]
>
>


-- 
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]




Re: [PHP-DB] SQL error:

2001-07-06 Thread Andrei Skorokhod

Which user are you connected as?
Who owns the table?
unless you connected as the user who owns the table or table is owned by dbo
you have to specify username.TBL_DEPT (where username is the name of the 
user who owns the table)

At 16:47 06.07.2001 +0800, you wrote:
>[EMAIL PROTECTED]



-- 
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]