Author Topic: auto increment of columns  (Read 1391 times)

0 Members and 1 Guest are viewing this topic.

Offline $printLnTopic starter

  • Irregular
  • Posts: 1
    • View Profile
auto increment of columns
« on: April 02, 2008, 03:43:06 PM »
How i do auto increment columns every time a new value is stored in the database?

Offline fenway

  • MySQL Si-Fu / PHP Resident Alien
  • Global Moderator
  • 'Mind Boggling!'
  • *
  • Posts: 15,444
  • Gender: Male
    • View Profile
Re: auto increment of columns
« Reply #1 on: April 02, 2008, 03:47:55 PM »
If you define the column as AUTO_INCREMENT, it will do it for you if you pass it a NULL value.
:anim_rules: Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.