Is there a limit to number of records?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Is there a limit to number of records?

Postby lizbuth » 07. July 2005 12:55

I've been using XAMPP successfully for a long while, but now I'm working with a large database. The table has only 7 fields but about 3000 records, and (hopefully) more to come. The db was originally created in Excel, which I then converted to a text file to import into mySQL. And it works for 127 records, but that's it. I've tried inserting 1 more record just using phpMyAdmin and get this message:

#1062 - Duplicate entry '127' for key 1

The problem doesn't appear to be with the text file (only 109kb) or the way I import it, since I get the first 127 records with no problem at all. And as I mentioned, inserting a new record manually doesn't work either. So is this a limitation of XAMPP, PHP, MySQL, or am I missing something?

Any and all help greatly appreciated
lizbuth
 
Posts: 4
Joined: 07. July 2005 12:21
Location: Canada

Re: Is there a limit to number of records?

Postby Dave_L » 07. July 2005 16:28

lizbuth wrote:#1062 - Duplicate entry '127' for key 1


That means you're trying to insert a row that has the same value for a unique key, probably the primary key, as an existing row.

For more information, you'd need to examine the table's schema (to see how the columns are defined) and look at the data you're inserting (to see what the duplicate value is).
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby taustin » 07. July 2005 18:01

Dave_L is right. 300 records is nothing. One of my databases is currently at just over 100,000.

If you look at the Structure page for the database in question, it will tell you which fields are keys.
taustin
 
Posts: 150
Joined: 24. September 2004 00:23
Location: Huntington Beach CA

Re: Is there a limit to number of records?

Postby lizbuth » 07. July 2005 18:33

That means you're trying to insert a row that has the same value for a unique key, probably the primary key, as an existing row.


Sorry, I should have mentioned that the table does have an ID field that is the primary key and is auto-incremented. I even tried inserting a row and typing in the next number for that field (128) and got the exact same message:

#1062 - Duplicate entry '127' for key 1

It just simply will not let me insert another record.
lizbuth
 
Posts: 4
Joined: 07. July 2005 12:21
Location: Canada

Postby Dave_L » 07. July 2005 18:40

What's the column type for that column? If it's "tinyint", that would explain the error, since that column type has a range of -128 to +127.

http://dev.mysql.com/doc/mysql/en/numeric-types.html
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

It just gets weirder and weirder

Postby lizbuth » 07. July 2005 19:12

Still testing out my database and trying to insert new records. After emptying the table, I extracted about 200 records from the middle of the original text file into a new file and loaded it, just to see what would happen with different numbers in the ID field (primary key). Well, it imported the first record, assigned the number 127 to the ID field (should have been #300) and stopped. I couldn't manually add any more records.
I've tried this with the auto-increment option turned off as well, same result. I've re-created the table, I tried importing different records, I just can't get more than 127 records in the table. Is there something in a config file that sets the # of records?
lizbuth
 
Posts: 4
Joined: 07. July 2005 12:21
Location: Canada

Postby lizbuth » 07. July 2005 19:17

Dave_L wrote:What's the column type for that column? If it's "tinyint", that would explain the error, since that column type has a range of -128 to +127.

OMG! That's it! Thanks so much Dave, you saved me the cost of a new wig! (from tearing my hair out)

:D
lizbuth
 
Posts: 4
Joined: 07. July 2005 12:21
Location: Canada


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 149 guests