I am suddenly getting the following error:
1062 Error: Duplicate entry '0' for key 2
Here is my db layout
#
Table structure for table FuneralDirectors
#
CREATE TABLE FuneralDirectors (
ID int(4) NOT NULL auto_increment,
FunDirID int(5) NOT NULL default '0',
FirstName varchar(50) default NULL,
LastName varchar(50) default NULL,
FuneralHome varchar(60) default NULL,
StreetAddress varchar(50) default NULL,
City varchar(25) default NULL,
State varchar(25) default NULL,
Zip varchar(15) default NULL,
Phone varchar(25) default NULL,
PRIMARY KEY (ID),
UNIQUE KEY FunDirID (FunDirID),
KEY FuneralHome (FuneralHome),
KEY FirstName (FirstName),
KEY LastName (LastName)
) TYPE=MyISAM COMMENT='List of Funeral Directors - related info.';
When I check the data in the db there is no duplicate entries.
When I echo the sql statement it shows:
INSERT INTO FuneralDirectors (FunDirID, FirstName, LastName, FuneralHome, StreetAddress, City, State, Zip, Phone) VALUES ('', 'Blank', 'Name', 'No One', '123 Any Drive', 'Sometown', 'IN', '11111', '123-456-7890')
Any Ideas? 😕