RE: [PHP-DB] MySQL Error???

From: Date: Thu, 28 Jun 2001 13:24:25 +0000
Subject: RE: [PHP-DB] MySQL Error???
Groups: php.db 
Request: Send a blank email to php-db+get-9921@lists.php.net to get a copy of this message
> -----Original Message----- > From: Brian Grayless [mailto:bgrayless@Premier-Resorts.com] > 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 (roedelm@letu.edu) | "There cannot be a crisis next week. Systems Programmer / WebMaster | My schedule is already full." LeTourneau University | -- Henry Kissinger

« previous php.db (#9921) next »