Member Avatar for kingben

Hi All...
Any way to auto-increment the last inserted numerical value in the field "id" and then insert the newer value (id+1) in the database upon submitting the form ??? ...... How do i resolve that last submitted "id" ?? .....

I thought of doing that using a txt file as a counter but is this the only way ???

Recommended Answers

All 4 Replies

Have you tried the AUTOINCREMENT property on the field in the database? Go take a look at the MySQL manual

Member Avatar for kingben

Have you tried the AUTOINCREMENT property on the field in the database? Go take a look at the MySQL manual

yeah have tried that ...... not working ..... may be am doing something wrong ........ any snippets ???

Yeah, in the MySQL manual there are in-depth explanations, go take a peek.

Member Avatar for kingben

Yeah, in the MySQL manual there are in-depth explanations, go take a peek.

Have figured it out ..... You have to set the "id" field as INT with Primary Key and Auto Increment ...... That's it ....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.