MySql question

@maria_k (925)
United States
January 7, 2009 4:11pm CST
Hi, does anybody here understand something about mysql and troubleshooting the error? I created a tble and insert links exactly as instructed , however I get this error: insert into counts set user = '80profits',date = '2009-01-07',number = 1,ipnum = '71.104.136.156',ipcnt = 1 1062 Duplicate entry '80profits' for key 1 Here is dumpling data for table "links": id next name url cnt defuser direct 2 0 MyBlog http://www.ecompeak.com/blog 0 Null 0 1 1 80profits http://www.80profits.com?mkinara 0 Null 0 3 0 VideoClipSites http://www.videoclipministes.com 0 Null 0 I appreciate your help
1 person likes this
4 responses
• Philippines
8 Jan 09
What exactly are you trying to do with mysql script? just curious. i'm also building a program using mysql, this one is a database for a school but i figured to put it on a webpage. do you think it's a good idea? i'm a bit doubtful. but it's working though
@maria_k (925)
• United States
8 Jan 09
It depends on the program. You can make a fairly good a mount of money if people can use it. Mine is an url rotator so i can mage all of my link in one page .
7 Jan 09
I'm not entirely sure from that lot as its often awkward to tell from just one side of the text without seeing its architecture and what you want to achieve. Does it actually put the data into the correct columns in your table? Are the insertion statements correctly defined to match the table itself? Does that error appear in plain text when you try to enter the data, or is that the layout of your table? It would help to know what exactly you want your code to do and subsequently what it is doing instead. You say you are inserting as instructed (by whom and are they right).. that doesn't really help, because if its the code that's the problem i can't advise without seeing it as it might need correcting.
@maria_k (925)
• United States
7 Jan 09
I already figured it out. thank you for the reply.
@sanuanu (11235)
• India
4 May 09
Duplicate Entry means that data already exist and can't be inserted again. So, you said that you figured it out but what was the problem. Sorry, it is 4 months now but couldn't resist muself.
• Philippines
27 Apr 09
most probably the "user" field was a unique/primary key and an entry with containing the "80profits" data already exists, i suggest performing an existence check first before performing the insert statement