PHP:插入数据时自动创建唯一ID [关闭]

I have "USERS" table like that :

============================
========== USERS ===========
============================
- id
- name
- surname
- avatar
- age
============================
============================

As you can see, the main key for each users is "id".

When i want to add a new user in my table, i would like to insert automatically the good value of "id" in order to have a unique "id" for each user.

Is there a way to do this?

Add an auto incremented primary key:

ALTER TABLE `USERS` MODIFY COLUMN id INT PRIMARY KEY AUTO_INCREMENT;

When inserting data to the table, you just leave the id out, it will be inserted (and unique) automatically.