> -----Original Message-----
> From: Brian Grayless [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 11:24 AM
> To: PHP DB list (E-mail)
> Subject: [PHP-DB] MySQL Error???
> Is anyone familiar with this MySQL error?
> "1062: Duplicate entry '127' for key 1"
> I wrote a great bookmark management program that works fine, 
> but everytime I insert bookmarks, I insert somewhere over 120
> and I start getting this error, and it won't add them anymore. 
> Any suggestions???

The error message is telling you that you have a "key" field defined
(that is, a field that must uniquely identify a row in your database),
and that you're trying to insert a row that has a value in that field
that you've already used.

Given that everything seems to work until you get to 127, I'd venture to
guess that it might be an autoincrement column of type 'tinyint'.  If
that's the case, consider changing it to a type with a higher capacity
(see http://www.mysql.com/doc/C/o/Column_types.html for more
information).  If not, then perhaps we might be able to provide more
useful suggestions if you could give a little more information about
your database structure and the source for the part of the program
that's causing problems...

Mark Roedel ([EMAIL PROTECTED]) | "There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full."
     LeTourneau University     |                   -- Henry Kissinger 

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to