sql - How to get the next auto-increment id in mysql -


how next id in mysql insert in table

insert payments (date, item, method, payment_code) values (now(), '1 month', 'paypal', concat("sahf4d2fdd45", id)) 

use last_insert_id() sql query.

or

you can use mysql_insert_id() using php.


Comments

Popular posts from this blog

php - Embed BBCode within itself not working -

minify - Minimizing css files -

Connecting Spring Batch to Remote Cassandra Database -