auto-increment???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
axel
Forum Newbie
Posts: 3
Joined: Mon Jun 10, 2002 11:10 am

auto-increment???

Post by axel »

Hello There,

I guess this is a silly question, but I ask it anyway: A tutorial told me to set the field for the ID to auto-increment. I know how to do it, but I could not find any clues what auto-increment means and what it does with the data in the table. I've checked the mysql-manual and even searched the web with Google to find an answer. Maybe I'm the only one who doesn't know. So please help me.

Thanks, Axel
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

In an auto-incrementing column the value is automatically incremented by one each time a new insert is done.
mysql documentation wrote:The AUTO_INCREMENT attribute can be used to generate an unique identity for new rows
Source: http://www.mysql.com/doc/e/x/example-AU ... EMENT.html

Mac
Post Reply