Auto increment in phpmyadmin

前端 未结 9 2065
暗喜
暗喜 2020-11-28 05:19

I have an existing database using PHP, MySQL and phpMyAdmin.

When users become a member on my website, I need the system to create a unique membership number for the

相关标签:
9条回答
  • 2020-11-28 05:48

    In phpMyAdmin, if you set up a field in your table to auto increment, and then insert a row and set that field's value to 10000, it will continue from there.

    0 讨论(0)
  • 2020-11-28 05:48

    (a)Simply click on your database, select your table. Click on 'Operations'. Under the 'table options' section change the AUTO_INCREMENT value to your desired value, in this case: 10000 the click 'Go'. (See the image attached)

    (b)Alternatively, you can run a SQL command under the SQL tab after selecting your table. Simply type 'ALTER TABLE table_name AUTO_INCREMENT = 10000;' then click 'Go'. That's it!! SETTING AUTO INCREMENT VALUE image(a)

    SETTING AUTO INCREMENT VALUE image(B)

    0 讨论(0)
  • 2020-11-28 05:54

    There are possible steps to enable auto increment for a column. I guess the phpMyAdmin version is 3.5.5 but not sure.

    Click on Table > Structure tab > Under Action Click Primary (set as primary), click on Change on the pop-up window, scroll left and check A_I. Also make sure you have selected None for Defaultenter image description here

    0 讨论(0)
提交回复
热议问题