Results 1 to 2 of 2
Thread: Setting Id
-
02-04-2006, 03:22 PM #1Junior Guru Wannabe
- Join Date
- Nov 2005
- Posts
- 36
Setting Id
Ok, so, I have a field in my table called id...right? and i want to make it so that whenever information is added to the other fields the id is automatically added as the next number...
example:
i have a script and add a row with with my other fields there, then i add another and another...
so it would have this
Id: ? Blah: Cocoa Time: Now
Id: ? Blah: Cheese Time:Yesterday
Id: ? Blah: Apple Time: Tommorow
how would i get it so that the Id field is automatically added and gets 1 bigger everytime i added a field so that it would be something like:
Id: ? Blah: Cocoa Time: Now
Id: ? Blah: Cheese Time:Yesterday
Id: ? Blah: Apple Time: TommorowAdvancetheweb.com - Taking the Web to a Better Place
Offering: Budget Webhosting, Pen Tests and Many other Services
-
02-04-2006, 03:44 PM #2Web Developer
- Join Date
- Feb 2003
- Location
- Connecticut
- Posts
- 5,460
in phpmyadmin, set `id` as auto_increment