# Defining key with phpmyadmin

**URL:** <https://forum.kirupa.com/t/defining-key-with-phpmyadmin/246114>\
**Category:** Uncategorized\
**Created:** [December 7, 2007, 6:19am UTC](https://forum.kirupa.com/t/defining-key-with-phpmyadmin/246114 "2007-12-07T06:19:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [December 7, 2007, 6:19am UTC](https://forum.kirupa.com/t/defining-key-with-phpmyadmin/246114/1 "2007-12-07T06:19:27Z")

</div>

OK,

Please tell me if I am going about this all wrong…

I’m coming from using arrays so this is a little different as the DB doesnt auto generate IDs for me…

So I have a DB with a couple of columns, thats all sweet. What I want to do, is add some kind of numbering system, an automatic one of course. I think this is called defining the ‘key’ but I can not work out how to do this with phpMyAdmin? Can anyone help?

And secondly, say I delete an item or row, will this automatically patch the numbers, like when you splice an array? Or do I have to do this manually?

Thanks
