Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    8

    Unanswered: auto_increment problem

    i have 3 fields in my table and the first field is my primary key which is also
    auto_increment when i insert to this table the first data that will appear in my table particularly in my first field is 1 then when i insert again it becomes 2 and so on

    my question is how can i make the auto_increment table will have the value
    that looks like this

    value1
    value2
    value3
    ....
    value20
    ....
    and so on...


    i am using phpMyAdmin...
    any help please....

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you cannot

    however, you can always "assemble" this whenever you retrieve data from the table
    Code:
    select concat('value',autoincrcolumn) as mykey, ...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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