Abdul Quddos

Abdul Quddos

  • NA
  • 9
  • 1.3k

Dispaly Auto Incremnetd ID

Apr 7 2014 7:35 AM
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)