title: How to create unique registration number
body: <p>I am trying to get unique admission number for every student. So I am counting number of rows in database and displaying value in student admission number. But if I enter student details and after submission it will be saved in database and when I delete that and if I again want to enter the new student details its taking the same register number which i deleted .I want unique registration numbers. So please help me to get the unique numbers which should not be repeated.</p>