Results 1 to 2 of 2

Thread: Setting Id

  1. #1

    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: Tommorow
    Advancetheweb.com - Taking the Web to a Better Place
    Offering: Budget Webhosting, Pen Tests and Many other Services

  2. #2
    Join Date
    Feb 2003
    Location
    Connecticut
    Posts
    5,460
    in phpmyadmin, set `id` as auto_increment

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •