Page 1 of 1

Auto incrementing key in a table.

Posted: Tue Feb 28, 2006 10:12 am
by mattyboi
How do you create a key that auto increments in a table everytime a new record is added using phpMyAdmin?

Thanks

Posted: Tue Feb 28, 2006 10:41 am
by feyd
Set the field to auto_increment. :?

Posted: Tue Feb 28, 2006 11:02 am
by mattyboi
yeah i did that, but for some reason it is still not working. what do i set the field type as, and the defualt value?

Posted: Tue Feb 28, 2006 11:04 am
by feyd
field type is an INT base, the size only matters in how many records you wish to support without reordering. INT(10) UNSIGNED is the minimum suggested by many. default value doesn't matter. It must be set to PRIMARY.