6
Answers

Dispaly Auto Incremnetd ID

Abdul Quddos

Abdul Quddos

10y
926
1
Hi Experts!
 
i need to give a unique id to a product on some user selections and display it to user, now i'm accomplishing it  first go into db and get the max number, add one to this and finally display complete ID to the user. and now user select some other options and finally hit submit button and get record saved message.
 
Is it good way? i'm hitting database twice or more depends upon user's selection on changing.
Is there any best solution then plz feel free to suggest 

Answers (6)