php - MYSQL Pull auto increment value -


is possible add entry database has auto increment column , pull value of auto increment number enter it?

the company work accepting leads, , when lead comes in, has assigned unique customer number can never duplicated. love use mysql auto increment, need pull value stores lead entered can go out lenders api's along unique customer number.

any help??!!

yes, in mysql can use function last_insert_id() or php can use mysqli_insert_id() or pdo::lastinsertid() return last value automatically inserted auto-increment column previous query.

see: php documentation, mysql documentation


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -