i get this error eatch time i try to insert this Duplicate entry 'http://kljvxvs.com/files/kk2' for key 2

why when i try to insert data to mysql i get this error

Duplicate entry 'http://kljvxvs.com/files/kk2' for key 2
if try to insert http://kljvxvfdsfdsfds2 for key 2
why is this?
mgtm3Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fouriceCommented:
Perhaps you are trying to insert a record with an already existing key id?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MMDeveloperCommented:
sounds like the column that stores that text, is set to be the index/primary key.
0
Loganathan NatarajanLAMP DeveloperCommented:
yes, the column field might be set as UNIQUE , just check it
0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

mgtm3Author Commented:
what coulmn are you talking about the one that stores http://kljvxvs.com/files/kk2'   or the on the stores the key 2 ???????
0
fouriceCommented:
Look at your table structure. The table you are inserting the record to must have 1 or more fields. Is one of those fields set as UNIQUE? You can use PhpMyAdmin to find this out.
Also what is the code part that inserts this into the db?
0
MMDeveloperCommented:
unless I'm mistaken, I think key 2 means it's the second column of the table, which is probably the one that contains the string "http...."
0
mgtm3Author Commented:
yes one of them is uniqe but the thing that i am tring to insert does not exest in the databse
0
fouriceCommented:
Perhaps showing some code, the table structure and table content could be of help.
Are you also sure there is no other field which is the same? Like a key or something?
0
ScannyRCommented:
Can you please post your table structure (including any specified keys) and the query you are trying to execute?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.