extremely large id key number

C

Chris

Guest
My database currently has 93 rows. I frequently get an error when inserting a new row. I just read how to change the debug value and I will do that very soon.

However, when I opened my database in PHPAdmin I noticed my id number had grown extremely large. During the 93 rows, my id went from 1 to 2147483647. I manually corrected all the id values back to a sequential order ending at 94. On the very next insert I get an error and then after successfully inserting the record, I check the id number and the new record is back to 2147483648. How do I get this to check the unique id and use the next one available? I need to reset the number it uses back to match the table.
 
D

Debbie S

Guest
Chris

I've only noticed this problem when the ID field of a database table is set to "unique_id" in the interface configurator. If you leave the ID (primary/unique key of table) at the defaults (text/alphanumeric) and have your table field set to auto-increment, everything should be fine.

Debbie
(Latest version of DaDaBIK when this message was posted: 3.2 Beta)
 
C

Chris

Guest
That seemed to have fixed the problem but I had to run:

ALTER TABLE `table_name` AUTO_INCREMENT =new_number_here

This fixed the extremely large number in the autoindex.
 
B

bopper

Guest
I have tried it too, but I still get the large numbers in the index field when adding a new record. how should the index field be set in phpadmin?

i've had it at int(11) and auto-imcrement.
 
B

bopper

Guest
correction - it works after I ran the fix posted by Chris.
thanx
 
Top