Page 2 of 2
Re: Duplicate entry '' for key 2
Posted: Fri Aug 20, 2010 4:12 pm
by shawngoldw
and what happened when you did that? Was everything normal or not?
Re: Duplicate entry '' for key 2
Posted: Fri Aug 20, 2010 4:24 pm
by bian101
Yep all perfectly normal. Im talking to my lead programmer and he thinks it could be something to do with the primary key, but we are stumped!
Re: Duplicate entry '' for key 2
Posted: Fri Aug 20, 2010 4:32 pm
by shawngoldw
What field are you using for your primary key? And what attributes does it have? Is it auto increment?
Re: Duplicate entry '' for key 2
Posted: Sat Aug 21, 2010 2:36 am
by bian101
shawngoldw wrote:What field are you using for your primary key? And what attributes does it have? Is it auto increment?
Primary key are:
Address
Website
Description
(dont know why there primary)
and auto increment is:
ID.
Hope this helps

( ps im in london today and tommorow so i may not reply until tomorrow.
Re: Duplicate entry '' for key 2
Posted: Sat Aug 21, 2010 7:40 am
by shawngoldw
I assume that the composite primary key is also set to be unique?
When you were saying that it works for you and not everyone else, I assume you were always the first to try? When you insert into your database you do not set any of those 3 fields. If they are supposed to be unique, then that explains it telling you the key is a duplicate since somebody being inserted after you is given the same default values for address, website, and description.
Does this sound right?
Also, that seems like an odd choice for your primary key, if you have an auto increment id that is what is generally chosen to be the primary key. I don't know your exact situation and database schema so I can not tell you what your doing is not right though.
London england or ontario?
Shawn