Abhinav Kansal

Abhinav Kansal

  • NA
  • 19
  • 554

create id with multiple prefix

Jan 24 2017 2:40 AM
i want different id generate as i have a combo box having different cities name and a textbox. when i choose a city from combo box then according to it city name two initial values will pick and create a id.
if i do ten entries as same city then it will generate as DE01,DE02,....DE10.
AND IF next time i choose different city then it will generate PU01,PU02,...PU08.
next time if i want again do entry using delhi city then it will check from database that how many it has previous entries then it will generate DE11,DE12,...DE16.
Next time on choose punjab it will generate PU09,PU10,...PU17.

Answers (3)