Jump to content


Photo

auto_increment? What?


  • Please log in to reply
2 replies to this topic

#1 Natedawg

Natedawg
  • Members
  • Pip
  • Newbie
  • 2 posts
  • LocationKansas City, KS

Posted 25 December 2003 - 01:56 PM

I would like a number to be made to go with each row in my table. It must be a different number for every row, and I can\'t have to type it in manually. Is auto_increment the answer? If so, how do I do it? If not, what should I do?
There is no spoon.

#2 shortkid422

shortkid422
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 25 December 2003 - 03:23 PM

ya, it is. each number will increase by one, so it would be 1,2,3,4,5,6... and so on. It will be increased everytime a row is added, so no work.
Need some php work thats cheap and reliable?[br]AIM shortmonkey422[br]MSN shortkid422@hotmail.com[br]Email: shortkid422@hotmail.com

#3 Hokus

Hokus
  • Members
  • PipPip
  • Member
  • 23 posts
  • LocationAlameda, CA, USA

Posted 25 December 2003 - 07:45 PM

Simply don\'t assign any value to the field you want to auto-increment,
MySQL will do it for you.
[!--sizeo:2--][span style="font-size:10pt;line-height:100%"][!--/sizeo--][!--fonto:Arial--][span style="font-family:Arial"][!--/fonto--][!--coloro:blue--][span style="color:blue"][!--/coloro--]"Experience is a wonderful thing. It enables you to recognize a mistake when you make it again".
[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][!--fontc--][/span][!--/fontc--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users