Jump to content

[SOLVED] SQL error involving duplication


Eggzorcist

Recommended Posts

Primary keys must be non-null and unique.  So if you defiend ID as a primary key auto-increment field and you place a row with ID=0 in the table, you can not place another row with ID=0 in the table.

 

Instead you must use a form of UPDATE:

UPDATE `thetable` set ... WHERE ID=0

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.