auto generate id on customer table like cus001.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webtechbharathi
    New Member
    • May 2014
    • 9

    auto generate id on customer table like cus001.

    I want develop customer table. here i want create customer id like cus01 .i insert into more customer its automatically add id cus02 next automatically increase cus03 etc,in php mysql how to do this help me frnds.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    For the auto increment field: RTFM

    ",in php mysql how to do this help me frnds"
    There's no such thing as php MySQL.
    PHP is a programming language
    and MySQL is a database.

    When inserting a record in the table of the database that has an auto increment field, inserting NULL will give it the next value.
    Code:
    INSERT INTO customer (customerid, name)
    VALUES (NULL, 'webtechbharathi ');

    Comment

    Working...