Thanks Pradeep,

You are right, I had not auto-incremented.   Now mysql is happy, but there
is something strange about php.   And all it will tell me is 'query failed'.

Joseph

Just let me know if u have a primary key.
If it's there then u r duplicating the value already present in the
primary key field.


Thanks,
Pradeep

Joseph Harris wrote:

>I have one table and form and php insert working well and thought I had
>applied its lessons.   But I am getting this below.    I have tried a lot
of
>combinations but this seems the sticking point.   Advice welcome---
>
>SQL-query :
>INSERT INTO spw_addresses( spw_addresses_id, spw_addresses_company,
>spw_addresses_building, spw_addresses_number, spw_addresses_street,
>spw_addresses_street2, spw_addresses_town, spw_addresses_statecp,
>spw_addresses_country, spw_addresses_zipcode, spw_addresses_phone,
>spw_addresses_fax, spw_addresses_email1, spw_addresses_email2,
>spw_addresses_email3, spw_addresses_website1, spw_addresses_website2 )
>VALUES (
>
>'', '$_POST[company_name]', '$_POST[building]', '$_POST[number]',
>'$_POST[street1]', '$_POST[street2]', '$_POST[town]', '$_POST[state] ',
>'$_POST[country]', '$_POST[zip]', '$_POST[phone]', '$_POST[fax]',
>'$_POST[email1]', '$_POST[email2]', '$_POST[email3]', '$_POST[web1]',
>'$_POST[web2]'
>)
>
>MySQL said:
>
>
>#1062 - Duplicata du champ '0' pour la clef 1
>
>
>____ • The WDVL Discussion List from WDVL.COM • ____
>To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
>       Send Your Posts To: [EMAIL PROTECTED]
>To set a personal password send an email to [EMAIL PROTECTED] with the
words: "set WDVLTALK pw=yourpassword" in the body of the email.
>To change subscription settings to the wdvltalk digest version:
>    http://wdvl.internet.com/WDVL/Forum/#sub
>
>________________  http://www.wdvl.com  _______________________
>
>You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
>To unsubscribe send a blank email to [EMAIL PROTECTED]
>
>To unsubscribe via postal mail, please contact us at:
>Jupitermedia Corp.
>Attn: Discussion List Management
>475 Park Avenue South
>New York, NY 10016
>
>Please include the email address which you have been contacted with.
>
>
>
>
>



____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the
words: "set WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.



____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set 
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to